Cancel a plan from the prepare step #214
Replies: 1 comment 1 reply
-
To bypass the This could mean that, if in the The updated label on the node, |
Beta Was this translation helpful? Give feedback.
-
To bypass the This could mean that, if in the The updated label on the node, |
Beta Was this translation helpful? Give feedback.
-
I would like to know how to cancel/bypass a Plan once it is selected.
My example use case is a system upgrade, say from Buster to Bullseye, then from Bullseye to Bookworm.
bullseye-upgrade
, thus will applyplan.upgrade.cattle.io/bullseye-upgrade=<version>
plan.upgrade.cattle.io/buster-upgrade
with any value.plan.upgrade.cattle.io/buster-upgrade
to my nodes in order to trigger the first Plan.bookworm-upgrade
, thus will applyplan.upgrade.cattle.io/bookworm-upgrade=<version>
plan.upgrade.cattle.io/bullseye-upgrade
with any value.To make this work, I apply the label
plan.upgrade.cattle.io/buster-upgrade
orplan.upgrade.cattle.io/bullseye-upgrade
with value0
to my nodes, depending on their distribution, in order to trigger the updates.You may see the issue approaching: because the version is
0
, the Controller decides that the Plan that matches the label is outdated and reapplies it. No problem, I can intercept this in theprepare
orupgrade
initContainers and not do anything. And the node is labelled with the latest Plan version as a result.However there seems to be no way to bypass the
upgrade
initContainer. So even if the Plan does nothing (because its script detects there is nothing to do), the node is cordoned/drained because it might need to be rebooted. That is not a no-go, but could be improved.So, how do I "bypass" an upgrade and its impact on the cluster node once a Plan is selected?
Beta Was this translation helpful? Give feedback.
All reactions