cilium-cli icon indicating copy to clipboard operation
cilium-cli copied to clipboard

Cilium upgrade in Helm mode doesn't respect installed version and will attempt to downgrade/upgrade whatever version is marked as tool default

Open jspaleta opened this issue 1 year ago • 0 comments

Bug report

cilium upgrade doesn't detect installed version of cilium and if you don't have the default version install will choose to replace the installed version with whatever the default for the cli tool is.

General Information

$ cilium version
cilium-cli: v0.14.7 compiled with go1.20.4 on linux/amd64
cilium image (default): v1.13.3
cilium image (stable): v1.13.4
cilium image (running): unknown. Unable to obtain cilium version, no cilium pods found in namespace "kube-system"
kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.3", GitCommit:"25b4e43193bcda6c7328a6d147b1fb73a33f1598", GitTreeState:"clean", BuildDate:"2023-06-14T09:53:42Z", GoVersion:"go1.20.5", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.1", GitCommit:"4c9411232e10168d7b050c49a1b59f6df9d7ea4b", GitTreeState:"clean", BuildDate:"2023-05-12T19:03:40Z", GoVersion:"go1.20.3", Compiler:"gc", Platform:"linux/amd64"}
$kind version
kind v0.19.0 go1.19.5 linux/amd64

How to reproduce the issue

  1. kind cluster create
  2. export CILIUM_CLI_MODE=helm
cilium install --version v1.14.0-snapshot.3
🔮 Auto-detected Kubernetes kind: kind
✨ Running "kind" validation checks
✅ Detected kind version "0.19.0"
ℹ️  Using Cilium version 1.14.0-snapshot.3
🔮 Auto-detected cluster name: kind-kind
ℹ️  kube-proxy-replacement disabled
🔮 Auto-detected datapath mode: tunnel
🔮 Auto-detected kube-proxy has been installed
  1. cilium status --wait
  2. cilium version confirm installed cilium is what is expected
cilium upgrade --helm-set "--set prometheus.enabled=true" --reuse-values 
🔮 Auto-detected Kubernetes kind: kind
✨ Running "kind" validation checks
✅ Detected kind version "0.19.0"
ℹ️  Using Cilium version 1.13.3   
🔮 Auto-detected cluster name: kind-kind
ℹ️  kube-proxy-replacement disabled
🔮 Auto-detected datapath mode: tunnel
🔮 Auto-detected kube-proxy has been installed

Error: Unable to upgrade Cilium: template: cilium/templates/hubble/tls-helm/server-secret.yaml:2:10: executing "cilium/templates/hubble/tls-helm/server-secret.yaml" at <include "hubble-generate-certs.helm.setup-ca" .>: error calling include: template: cilium/templates/hubble/tls-helm/_helpers.tpl:15:23: executing "hubble-generate-certs.helm.setup-ca" at <.Values.hubble.tls.ca.cert>: nil pointer evaluating interface {}.cert
cilium upgrade --helm-set "--set prometheus.enabled=true" --reuse-values --version v1.14.0-snapshot.3
🔮 Auto-detected Kubernetes kind: kind
✨ Running "kind" validation checks
✅ Detected kind version "0.19.0"
ℹ️  Using Cilium version 1.14.0-snapshot.3
🔮 Auto-detected cluster name: kind-kind
ℹ️  kube-proxy-replacement disabled
🔮 Auto-detected datapath mode: tunnel
🔮 Auto-detected kube-proxy has been installed

jspaleta avatar Jun 16 '23 01:06 jspaleta