Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add new admin command to print Argo CD initial password (11117) #11155

Merged
merged 12 commits into from Nov 4, 2022

Conversation

iam-veeramalla
Copy link
Member

Signed-off-by: iam-veeramalla abhishek.veeramalla@gmail.com

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

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).
  • 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.
  • Optional. My organization is added to USERS.md.
  • 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).

Fixes #11117
Closes #11117

@codecov
Copy link

codecov bot commented Nov 2, 2022

Codecov Report

Base: 45.63% // Head: 45.60% // Decreases project coverage by -0.03% ⚠️

Coverage data is based on head (5a6cb93) compared to base (ac69e27).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11155      +/-   ##
==========================================
- Coverage   45.63%   45.60%   -0.04%     
==========================================
  Files         238      239       +1     
  Lines       28953    28973      +20     
==========================================
  Hits        13214    13214              
- Misses      13920    13940      +20     
  Partials     1819     1819              
Impacted Files Coverage Δ
cmd/argocd/commands/admin/admin.go 14.40% <0.00%> (-0.12%) ⬇️
cmd/argocd/commands/admin/initial_password.go 0.00% <0.00%> (ø)
util/settings/settings.go 51.25% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

Thanks @iam-veeramalla! One small grammar tweak.

Could you also update the quick start guide to reference this new command instead of the kubectl command?


if initialPass, ok := secret.Data["password"]; ok {
fmt.Println(string(initialPass))
fmt.Println("\n This password must be only used for first time login. We strongly recommend you to update the password using `argocd account update-password`.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
fmt.Println("\n This password must be only used for first time login. We strongly recommend you to update the password using `argocd account update-password`.")
fmt.Println("\n This password must be only used for first time login. We strongly recommend you update the password using `argocd account update-password`.")

@crenshaw-dev
Copy link
Collaborator

Can you run CLI codegen again?

@iam-veeramalla
Copy link
Member Author

Can you run CLI codegen again?

Sure, will do that tomorrow morning.

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
@iam-veeramalla
Copy link
Member Author

iam-veeramalla commented Nov 3, 2022

My mac is giving me hard times in running the codegen and other make targets :( . Hope this commit will fix the failing CI.

@iam-veeramalla
Copy link
Member Author

@crenshaw-dev got the code-gen working now. PTAL

@iam-veeramalla
Copy link
Member Author

@crenshaw-dev just in case you missed my previous comment.

Fixed the failing CI and rebased the code.

docs/getting_started.md Outdated Show resolved Hide resolved
cmd/argocd/commands/admin/initial_password.go Outdated Show resolved Hide resolved
docs/user-guide/commands/argocd_admin_initial-password.md Outdated Show resolved Hide resolved
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev crenshaw-dev enabled auto-merge (squash) November 4, 2022 12:49
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev crenshaw-dev merged commit e21a82f into argoproj:master Nov 4, 2022
ashutosh16 pushed a commit to ashutosh16/argo-cd that referenced this pull request Nov 23, 2022
…argoproj#11155)

* feat: Add new admin command to print Argo CD initial password (11117)

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix failing CI

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix failing CI

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix failing CI

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix failing CI

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix failing CI

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* Update docs/getting_started.md

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Update cmd/argocd/commands/admin/initial_password.go

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Update docs/user-guide/commands/argocd_admin_initial-password.md

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
emirot pushed a commit to emirot/argo-cd that referenced this pull request Jan 27, 2023
…argoproj#11155)

* feat: Add new admin command to print Argo CD initial password (11117)

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix failing CI

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix failing CI

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix failing CI

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix failing CI

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix failing CI

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* Update docs/getting_started.md

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Update cmd/argocd/commands/admin/initial_password.go

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Update docs/user-guide/commands/argocd_admin_initial-password.md

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
@ofirshtrull
Copy link

I don't know if I'm missing something but, how is this helpful? if you ran argocd login that means that you already have the password in hand...
so how does this benefit the users?

@gopikrishna7
Copy link

@ofirshtrull , Before argocd login you can run this command to get the initial admin password. Using this initial admin password you can login to ArgoCD UI or CLI.

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.

Add admin command to get initial password
4 participants