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

Allow installing Cilium snapshot versions #1452

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

tklauser
Copy link
Member

@tklauser tklauser commented Mar 14, 2023

The first commit updates the vendored github.com/cilium/cilium packages to latest master to pull in cilium/cilium#24286.

The second commit refactors internal/utils.CheckVersion to avoid some boilerplate and to de-duplicate the error message returned upon failure to parse a version.

The third commit fixes matching of snapshot releases in cilium-cli.

With the cilium binary installed from this PR, Cilium 1.14.0-snapshot.0 can be installed as expected:

$ cilium install --version v1.14.0-snapshot.0
🔮 Auto-detected Kubernetes kind: kind
✨ Running "kind" validation checks
✅ Detected kind version "0.17.0"
ℹ️  Using Cilium version 1.14.0-snapshot.0
🔮 Auto-detected cluster name: kind-kind
🔮 Auto-detected datapath mode: tunnel
🔮 Auto-detected kube-proxy has been installed
ℹ️  helm template --namespace kube-system cilium cilium/cilium --version 1.14.0-snapshot.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.14.0-snapshot.0...
🚀 Creating Agent DaemonSet...
🚀 Creating Operator Deployment...
⌛ Waiting for Cilium to be installed and ready...
✅ Cilium was successfully installed! Run 'cilium status' to view installation health

/cc @jspaleta

Fixes #1448

…k fix

cilium-cli uses the github.com/cilium/cilium/pkg/versioncheck package to
parse Cilium versions. In the latest version, this package was fixed to
allow parsing snapshot release versions, cf.
cilium/cilium#24286

For #1448

Signed-off-by: Tobias Klauser <tobias@cilium.io>
This allows to get rid of some boilerplate and de-duplicate the error
message.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
Currently, installing snapshot version results in an error:

   $ cilium install --version v1.14.0-snapshot.0
   invalid parameters: invalid syntax "v1.14.0-snapshot.0" for image tag

Fix it by allowing dots in the part after the dash.

Fixes #1448

Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser requested review from a team as code owners March 14, 2023 09:49
@tklauser tklauser requested review from sayboras, chancez and rolinh March 14, 2023 09:49
@tklauser tklauser temporarily deployed to ci March 14, 2023 09:49 — with GitHub Actions Inactive
Copy link
Member

@sayboras sayboras left a comment

Choose a reason for hiding this comment

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

Checked last two commits, and tested locally ✔️

@tklauser tklauser merged commit a2058ff into master Mar 15, 2023
@tklauser tklauser deleted the pr/tklauser/version-allow-snapshot branch March 15, 2023 03:58
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.

cilium install --version doesn't let you install snapshot versions.
3 participants