-
Notifications
You must be signed in to change notification settings - Fork 1.4k
📖 Add implementation notes to the in-place update proposal #12880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
k8s-ci-robot
merged 3 commits into
kubernetes-sigs:main
from
fabriziopandini:add-in-place-implementation-details
Oct 28, 2025
Merged
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
docs/proposals/20240807-in-place-updates-implementation-notes.md
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,88 @@ | ||||||
| # In-place updates in Cluster API - Implementations notes | ||||||
|
|
||||||
| This document is a collection of notes about implementation details for the in-place update proposal. | ||||||
|
|
||||||
| As soon as the implementation will be completed, some of the notes in this document will be moved back | ||||||
| into the proposal or into the user-facing documentation for this feature. | ||||||
|
|
||||||
| ## Notes about in-place update implementation for machine deployments | ||||||
|
|
||||||
| - In place is always considered as potentially disruptive | ||||||
| - in place must respect maxUnavailable | ||||||
| - if maxUnavailable is zero, a new machine must be created first, then as soon as there is “buffer” for in-place, in-place update can proceed | ||||||
| - when in-place is possible, the system should try to in-place update as many machines as possible. | ||||||
| - maxSurge is not fully used (it is used only for scale up by one if maxUnavailable =0) | ||||||
|
|
||||||
| - No in-place updates are performed when using rollout strategy on delete. | ||||||
|
|
||||||
| - The implementation respects the existing set of responsibilities of each controller: | ||||||
| - MD controller manages MS: | ||||||
| - MD controller enforces maxUnavailable, maxSurge | ||||||
| - MD controller decides when to scale up newMS, when to scale down oldMS | ||||||
| - When scaling down, the MD controller checks whether the operation can be performed in-place instead of delete/recreate. If in-place is possible: | ||||||
| - Old MS is instructed to move machines to the newMS, and newMS is informed to receive machines from oldMS. | ||||||
| - MS controller manages a subset of Machines | ||||||
| - When scaling down the old MS, if required to move, MS controller is responsible for moving a Machine to newMS | ||||||
| - When reconciling the new MachineSet, the MS controller takes ownership of the moved machine and begins the actual in-place upgrade. | ||||||
|
|
||||||
| - Orchestration of in-place upgrades between MD controller, MS controller, and Machine controller is implemented using annotations. | ||||||
| Following schemas provide an overview of how new annotations are used. | ||||||
|
|
||||||
| Workflow #1: MD controller detects an in-place update is possible and it informs oldMS and newMS about how to perform this operation. | ||||||
|
|
||||||
| ```mermaid | ||||||
| sequenceDiagram | ||||||
| autonumber | ||||||
| participant MD Controller | ||||||
| participant RX | ||||||
| participant MS1 (OldMS) | ||||||
| participant MS2 (NewMS) | ||||||
| MD Controller-->>+RX: Can you update in-place from MS1 (OldMS) to MD2 (NewMS)? | ||||||
| RX-->>-MD Controller: Yes! | ||||||
| MD Controller->>MS1 (OldMS): Apply annotation ".../move-machines-to-machineset": "MS2" | ||||||
| MD Controller->>MS2 (NewMS): Apply annotation ".../receive-machines-from-machinesets": "MS1" | ||||||
| ``` | ||||||
|
|
||||||
| Workflow #2: MS controller, when reconciling oldMS, move machines to the newMS. | ||||||
|
|
||||||
| ```mermaid | ||||||
| sequenceDiagram | ||||||
| autonumber | ||||||
| participant MS Controller as MS Controller<br/>when reconciling<br/>MS1 (OldMS) | ||||||
| participant MS1 (OldMS) | ||||||
| participant MS2 (NewMS) | ||||||
| participant M1 as M1<br/>controlled by<br/>MS1 (OldMS),<br/>selected to be moved to MS2 | ||||||
|
||||||
| participant M1 as M1<br/>controlled by<br/>MS1 (OldMS),<br/>selected to be moved to MS2 | |
| participant M1 as M1<br/>controlled by<br/>MS1 (OldMS),<br/>selected to be moved to MS2 (NewMS) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.