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 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