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

upgrade: `cilium upgrade` should not allow to upgrade to a greater minor version

Open kaworu opened this issue 4 years ago • 4 comments

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.

kaworu avatar May 31 '21 13:05 kaworu

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.

slayer321 avatar May 22 '22 13:05 slayer321

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 avatar May 23 '22 08:05 kaworu

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

aanm avatar May 23 '22 11:05 aanm

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?

kaworu avatar May 23 '22 12:05 kaworu