Repository navigation
Conversation
MaintenanceInProgress status condition during approved maintenance
…tenance Signed-off-by: Andreas Fritzler <andreas.fritzler@sap.com>
afritzler
force-pushed
the
enh/node-maintenance
branch
from
November 10, 2026 10:43
0730627 to
29392d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Summary
The node reconciler now writes a
MaintenanceInProgresscondition intonode.status.conditionswhile a maintenance is approved and still needed, and removes it once the maintenance is over.MaintenanceInProgressis one of the five well-known Node lifecycle conditions introduced in Kubernetes v1.37 (see the Kubernetes blog post and KEP-5683). Until now the state of an ongoing maintenance was only visible by correlating labels on theServerClaimin the metal cluster with labels on the node in the target cluster. Anything that just looks at the node (people, dashboards, and eventually core components like the DaemonSet controller) can now read it directly. Publishing these conditions today does not require theNodeLifecycleConditionsfeature gate: in v1.37 the gate is a no-op, and administrators or their controllers are expected to own the writes.How the flow works
flowchart LR subgraph metal cluster Claim["ServerClaim labels"] end subgraph target cluster NodeLabels["Node labels"] NodeStatus["Node status conditions"] end Claim -- "maintenance-needed=true" --> NodeLabels NodeLabels -- "workload controller adds maintenance-approved=true" --> NodeLabels NodeLabels -- "reconciler syncs approval back" --> Claim NodeLabels -- "approved and needed" --> NodeStatus["MaintenanceInProgress=True<br/>reason: PlannedMaintenance"] Claim -- "maintenance-needed removed" --> NodeLabels NodeLabels -- "no longer needed" --> NodeStatusGone["condition removed"]Walking through it:
metal.ironcore.dev/maintenance-needed=trueon theServerClaim. The ServerClaim reconciler copies the label onto the matching node (found through the node'sspec.providerIDfield index).metal.ironcore.dev/maintenance-approved=true. The node reconciler syncs that approval back onto theServerClaim. Once the approval has landed there and the maintenance is still needed, the same reconciler setsstatus.conditions[MaintenanceInProgress]on the node withstatus=Trueandreason=PlannedMaintenance.maintenance-neededlabel goes away. The reconcile strips the approval from the claim and removes the node condition in the same pass. Removal instead of parking it atFalseis one of the two options the v1.37 guidance suggests, and a condition whose reason no longer exists should not exist either.This also follows the blog's recommended pattern overall: the labels and the approval handshake remain the mechanism that drives the maintenance, the condition only reports its state.
Caveat
This mapping between
ServerClaimstate and node labels currently lives inside the CCM. That is convenient for now but it is not really the CCM's job in the long run, and it should eventually be factored out into a dedicated controller project.