cilium / cilium-cli

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

cilium install --wait=false doesn't work #1070

Closed joestringer closed 2 years ago

joestringer commented 2 years ago

I have created a local kind environment, and I run:

$ cilium install --wait=false
🔮 Auto-detected Kubernetes kind: kind
✨ Running "kind" validation checks
✅ Detected kind version "0.11.1"
ℹī¸  Using Cilium version 1.12.0
🔮 Auto-detected cluster name: kind-kind
🔮 Auto-detected datapath mode: tunnel
ℹī¸  helm template --namespace kube-system cilium cilium/cilium --version 1.12.0 --set cluster.id=0,cluster.name=kind-kind,encryption.nodeEncryption=false,ipam.mode=kubernetes,kubeProxyReplacement=disabled,operator.replicas=1,serviceAccounts.cilium.name=cilium,serviceAccounts.operator.name=cilium-operator,tunnel=vxlan
ℹī¸  Storing helm values file in kube-system/cilium-cli-helm-values Secret
🔑 Created CA in secret cilium-ca
🔑 Generating certificates for Hubble...
🚀 Creating Service accounts...
🚀 Creating Cluster roles...
🚀 Creating ConfigMap for Cilium version 1.12.0...
🚀 Creating Agent DaemonSet...
🚀 Creating Operator Deployment...
⌛ Waiting for Cilium to be installed and ready...

However, the cilium binary sits there and waits for the cluster to be ready.

$ cilium version
cilium-cli: v0.12.1-1-gc0ebabe6a462 compiled with go1.18.3 on linux/amd64
cilium image (default): v1.12.0
cilium image (stable): v1.12.1
cilium image (running): v1.12.0
tklauser commented 2 years ago

This is probably because on --restart-unmanaged-pods defaults to true and then this condition kicks in:

https://github.com/cilium/cilium-cli/blob/f5b079c42bc417541f8bb7c88ddc95b171728ee0/install/install.go#L860-L881

A while back, #640 was opened with a suggestion on how to improve UX wrt. --wait/--restart-unmanaged-pods.

joestringer commented 2 years ago

:+1: thanks for the details. I'll close this as "duplicate". We can follow up on #640.