Skip to content

Conversation

ctrlaltf24
Copy link
Contributor

@ctrlaltf24 ctrlaltf24 commented Sep 12, 2024

Allow reading of the argo server and auth token from environment for the purposes of not including the token in the command string.

Prefer cli argument over value in environment.

Closes: #19897

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Allows the authentication token to come from environment if it's not found in cli args.

Signed-off-by: Nathan Shaaban <86252985+ctrlaltf24@users.noreply.github.com>
@ctrlaltf24 ctrlaltf24 requested a review from a team as a code owner September 12, 2024 01:52
Copy link

bunnyshell bot commented Sep 12, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link

bunnyshell bot commented Sep 12, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (master@aeb8b55). Learn more about missing BASE report.
Report is 455 commits behind head on master.

Files with missing lines Patch % Lines
cmd/argocd/commands/root.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #19898   +/-   ##
=========================================
  Coverage          ?   55.79%           
=========================================
  Files             ?      320           
  Lines             ?    44378           
  Branches          ?        0           
=========================================
  Hits              ?    24760           
  Misses            ?    17056           
  Partials          ?     2562           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@wanghong230 wanghong230 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexmt alexmt enabled auto-merge (squash) September 12, 2024 04:03
@alexmt
Copy link
Collaborator

alexmt commented Sep 12, 2024

@ctrlaltf24 please run make clidocsgen to regenerate CLI docs

auto-merge was automatically disabled September 12, 2024 18:10

Head branch was pushed to by a user without write access

@ctrlaltf24 ctrlaltf24 requested a review from a team as a code owner September 12, 2024 18:10
Signed-off-by: Nathan Shaaban <86252985+ctrlaltf24@users.noreply.github.com>
@ctrlaltf24 ctrlaltf24 force-pushed the allow-server-and-auth-token-to-be-passed-in-from-env branch from f1840f8 to def4d39 Compare September 12, 2024 18:22
Copy link
Member

@nitishfy nitishfy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks!

@gdsoumya gdsoumya merged commit 4e13b7f into argoproj:master Sep 17, 2024
27 of 28 checks passed
@ctrlaltf24 ctrlaltf24 deleted the allow-server-and-auth-token-to-be-passed-in-from-env branch September 17, 2024 17:31
adriananeci pushed a commit to adriananeci/argo-cd that referenced this pull request Dec 4, 2024
* feat: allow auth token to be passed in via env

Allows the authentication token to come from environment if it's not found in cli args.

Signed-off-by: Nathan Shaaban <86252985+ctrlaltf24@users.noreply.github.com>

* chore: generate cli docs

Signed-off-by: Nathan Shaaban <86252985+ctrlaltf24@users.noreply.github.com>

---------

Signed-off-by: Nathan Shaaban <86252985+ctrlaltf24@users.noreply.github.com>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Adrian Aneci <aneci@adobe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support loading auth token via environment on the cli
5 participants