tnu icon indicating copy to clipboard operation
tnu copied to clipboard

upgrade-k8s feature

Open onedr0p opened this issue 10 months ago • 5 comments

I'm wondering if there's any interest in adding support for upgrading kubernetes versions with this tool?

I can only think of a couple benefits:

  1. Currently the upgrade k8s plan runs X amount of times per control node. Given the first run is the only one that does the actual upgrade and the others are essentially a no-op. I think tnu could be able to more gracefully handle this?
  2. The upgrade would feel more native given tnu is using talos libraries to do it, it would also fit in nicely as we can use the same image for talos and the kubernetes plans.

onedr0p avatar Feb 13 '25 04:02 onedr0p

One issue I thought of is that the SUC node label plan.upgrade.cattle.io/kubernetes (even for the no-op ones) needs to be apply to all control nodes. Meaning that SUC will only applied the node label plan.upgrade.cattle.io/kubernetes for the nodes it runs the plans on so no matter what I'm guessing the plan needs to run on all the controllers.

onedr0p avatar Feb 13 '25 13:02 onedr0p

Seems like a fine idea.

Wouldn't you be able to constrain the plan to a single control node?

jfroy avatar Feb 13 '25 15:02 jfroy

Wouldn't you be able to constrain the plan to a single control node?

Yes you could however like I mentioned, doesn't SUC need to apply the plan.upgrade.cattle.io/kubernetes label to the node when it runs on it? So either way we would need a no-op job to run on each node so the label is applied?

onedr0p avatar Feb 13 '25 15:02 onedr0p

Wouldn't you be able to constrain the plan to a single control node?

Yes you could however like I mentioned, doesn't SUC need to apply the plan.upgrade.cattle.io/kubernetes label to the node when it runs on it? So either way we would need a no-op job to run on each node so the label is applied?

Ah yes you always need one no-op job/pod that succeeds which will in turn signal the controller that the upgrade has been applied and it can label the node.

jfroy avatar Feb 13 '25 15:02 jfroy

In that case I wonder if this features is truly needed, on one hand it would do pretty much the same thing that is happening now, on the other hand it does wrap up tnu to cover all the use-cases for talos.

onedr0p avatar Feb 13 '25 16:02 onedr0p