cilium / cilium-cli

CLI to install, manage & troubleshoot Kubernetes clusters running Cilium
https://cilium.io
Apache License 2.0
390 stars 196 forks source link

Subcommand 'version' hangs for on-premise, airgapped installations #2559

Open jcmcken opened 1 month ago

jcmcken commented 1 month ago

Proposal

Provide an environment variable or flag to prevent cilium version from contacting GitHub (or any other Internet endpoint). I suppose contacting the Kubernetes cluster in the defined kube config context is fine, since I think this is how tools like istioctl version and others also work.

General Information

I'm using the latest cilium CLI (as of this issue), but this issue exists going back a few years now looking at the git blame.

How to reproduce the issue

  1. Don't have connectivity to GitHub
  2. (Optional) Have strace installed.
  3. Run strace -ff -e connect cilium version (or just cilium version, strace is only used to verify what's hanging)
  4. Verify the command hangs. If using strace, you can see it's stuck trying to connect to GitHub IP addresses.