cilium-cli
cilium-cli copied to clipboard
upgrade: `cilium upgrade` should not allow to upgrade to a greater minor version
cilium upgrade should only be used to update to a patch version (e.g. from v1.9.7 to v1.9.8). Upgrading to a different minor version (e.g. from v1.9.8 to v1.10.0) is not supported yet. See this commit for context.
However, nothing is preventing a user to run cilium upgrade --version v1.10.0 when the cluster is running a v1.9.x version of Cilium.
The CLI should check that the cluster version and desired upgrade version are the same major and minor version. Maybe a --force flag could override the check.
Related to https://github.com/cilium/cilium-cli/issues/131 as both issues need a way to retrieve the running Cilium version from the cluster.
Hey @kaworu, I did like to work on this issue.
cilium upgrade should only be used to update to a patch version (e.g. from v1.9.7 to v1.9.8). Upgrading to a different minor version (e.g. from v1.9.8 to v1.10.0) is not supported yet.
I think upgrading to a different minor version is supported now. I installed cilium v1.9.16 first and after that, I used the command cilium upgrade. It upgrades to v1.10.11.
So is this issue still relevant? as the cilium upgrade command updated me to a minor version.
Hi @slayer321, thanks for reviving this issue. We've recently switched to a Helm based approach for cilium-cli (since v0.11.0) so it's possible that upgrading to a different minor version is working now. cc @aanm @tklauser for more context and clarification about whether it is supported or not :pray:
@kaworu @slayer321 it opens for that possibility but it's not implemented in cilium-cli. Feel free to open a PR that adds this functionality.
So if I understand correctly, we're looking to support upgrading to a different minor version. If correct, I suggest we close this issue and open a new one to add support for minor version upgrade since this one is about preventing it. Does that make sense?