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

'argocd version --client' fails if no valid Kubernetes context after using 'argocd login --core' #7426

Open
3 tasks done
donovanmuller opened this issue Oct 13, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@donovanmuller
Copy link

donovanmuller commented Oct 13, 2021

If you are trying to resolve an environment-specific issue or have a one-off question about the edge case that does not require a feature then please consider asking a question in argocd slack channel.

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

After logging into an Argo CD instance running in an EKS cluster with argocd login --core, I can no longer run argocd version --client without having a valid Kubernetes context to the EKS cluster.

The assumption is that argocd version --client would not require access to the Kubernetes API at all using --client.

To Reproduce

To successfully login with --core:

$ aws eks update-kubeconfig --name xxx --alias xxx
Updated context xxx in /Users/donovan/.kube/config

$ kubectl config set-context --current --namespace=argocd
Context "xxx" modified.
$ argocd login --core
Context 'kubernetes' updated
$ argocd version --client
argocd: v2.1.3+d855831.dirty
  BuildDate: 2021-09-30T22:11:24Z
  GitCommit: d855831540e51d8a90b1006d2eb9f49ab1b088af
  GitTreeState: dirty
  GoVersion: go1.17.1
  Compiler: gc
  Platform: darwin/amd64

Now, without any Kube context:

$ argocd logout kubernetes --core
Logged out from 'kubernetes'
$ rm ~/.kube/config
$ argocd version --client
Error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

Or with an invalid/expired (using assumed IAM Role tokens) Kube context for the EKS cluster:

$ argocd version --client

# just hangs...

Expected behavior

argocd version --client to return the argocd version regardless of Kubernetes context.

Version

$ argocd version --client
argocd: v2.1.3+d855831.dirty
  BuildDate: 2021-09-30T22:11:24Z
  GitCommit: d855831540e51d8a90b1006d2eb9f49ab1b088af
  GitTreeState: dirty
  GoVersion: go1.17.1
  Compiler: gc
  Platform: darwin/amd64

$ brew info argocd
argocd: stable 2.1.3 (bottled)
...
@joebowbeer
Copy link
Contributor

Fixed by #8341 ?

@donovanmuller
Copy link
Author

@joebowbeer hopefully, I'll check in once this lands in a release 👍

@joebowbeer
Copy link
Contributor

I see this commit in the 2.4.0 release candidates

@joebowbeer
Copy link
Contributor

Close?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants