Skip to content

Commit 64ec2a9

Browse files
docs(in-place-updates): add configurable fallback strategy
Introduce an opt-in `inPlaceFallback` field (Replace/Stop) so operators can require in-place-only updates. Default stays Replace; Stop halts the rollout and surfaces a condition instead of replacing Machines. Signed-off-by: Liangquan Li <liangquan.li@smartx.com>
1 parent b644830 commit 64ec2a9

1 file changed

Lines changed: 34 additions & 1 deletion

File tree

docs/proposals/20240807-in-place-updates.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ reviewers:
2121
- "@elmiko"
2222
- "@wking"
2323
creation-date: "2024-08-07"
24-
last-updated: "2024-08-07"
24+
last-updated: "2026-07-20"
2525
status: experimental
2626
---
2727

@@ -50,8 +50,10 @@ status: experimental
5050
- [Story 4](#story-4)
5151
- [Story 5](#story-5)
5252
- [Story 6](#story-6)
53+
- [Story 7](#story-7)
5354
- [High level flow](#high-level-flow)
5455
- [Deciding the update strategy](#deciding-the-update-strategy)
56+
- [Configurable fallback strategy](#configurable-fallback-strategy)
5557
- [MachineDeployment updates](#machinedeployment-updates)
5658
- [KCP updates](#kcp-updates)
5759
- [Machine updates](#machine-updates)
@@ -197,6 +199,9 @@ As a cluster operator, I want to update machine attributes supported by my infra
197199
#### Story 6
198200
As a cluster service provider, I want guidance/documentation on how to write external update extension for my own use case.
199201

202+
#### Story 7
203+
As a cluster operator whose Machines are expensive or destructive to replace (e.g. nodes with local storage, bare metal, or license-bound nodes), I want to declare that a given KubeadmControlPlane or MachineDeployment must only be updated in-place: when the update cannot proceed in-place, the rollout stops and reports why instead of replacing Machines. I accept that, in exchange, the cluster may stay not-fully-updated until I intervene.
204+
200205
### High level flow
201206

202207
```mermaid
@@ -277,6 +282,33 @@ If the combination of the updaters can handle ALL the desired changes then CAPI
277282

278283
If ANY of the desired changes cannot be covered by the updaters capabilities, CAPI will determine the desired state cannot be reached through external updaters. In this case, it will fallback to the rolling update strategy, replacing machines as needed.
279284

285+
### Configurable fallback strategy
286+
287+
The `inPlaceFallback` field on `KubeadmControlPlane` and `MachineDeployment` controls whether CAPI falls back to rolling replacement when an in-place update cannot proceed:
288+
289+
```yaml
290+
spec:
291+
rollout:
292+
strategy:
293+
type: RollingUpdate
294+
# Replace (default) | Stop
295+
inPlaceFallback: Stop
296+
```
297+
298+
| `inPlaceFallback` | In-place can proceed | In-place cannot proceed |
299+
|---|---|---|
300+
| `Replace` (default) | update in-place | fall back to rolling update (replace Machines) |
301+
| `Stop` | update in-place | stop: surface a condition and wait |
302+
303+
Scope and boundaries:
304+
305+
- `inPlaceFallback` only governs the decision phase — whether in-place is attempted at all remains governed by the `InPlaceUpdates` feature gate and registered extensions. Execution-phase failure handling and retries are unchanged.
306+
- `Stop` blocks only the implicit rollout-driven fallback — this includes both the case where the extension cannot cover the full diff and the case where KCP preflight checks flag the candidate Machine. Explicit replacement operations continue as today: user-initiated scale down, `cluster.x-k8s.io/delete-machine`, MachineHealthCheck remediation, and certificate-driven rollouts.
307+
- `inPlaceFallback` is orthogonal to `maxSurge` / `maxUnavailable`: when `Stop` is set and in-place can proceed, CAPI may still create a temporary buffer Machine to satisfy availability constraints (e.g. `maxUnavailable=0`). To avoid any temporary Machine creation, set `maxSurge=0` on KCP (requires `replicas >= 3`) or `maxUnavailable >= 1` on MachineDeployment.
308+
- Single-node control planes are out of scope, consistent with the existing single-node Non-Goal.
309+
310+
When `Stop` is set, the cluster may remain not-fully-updated until the user intervenes; the blocked state is surfaced via conditions.
311+
280312
### MachineDeployment updates
281313

282314
The MachineDeployment update should take care of:
@@ -751,6 +783,7 @@ we will provide a way to toggle the in-place possibly though the API.
751783
- [x] 2024-08: Open proposal [PR](https://github.com/kubernetes-sigs/cluster-api/pull/11029).
752784
- [x] 2025-04: Proposal merged
753785
- [x] 2025-12: Update proposal after first implementation
786+
- [ ] 2026-07: Proposed configurable fallback strategy (fail-closed / predictable rollouts) as a follow-up iteration.
754787

755788
<!-- Links -->
756789
[community meeting]: https://docs.google.com/document/d/1ushaVqAKYnZ2VN_aa3GyKlS4kEd6bSug13xaXOakAQI/edit#heading=h.pxsq37pzkbdq

0 commit comments

Comments
 (0)