You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
@@ -197,6 +199,9 @@ As a cluster operator, I want to update machine attributes supported by my infra
197
199
#### Story 6
198
200
As a cluster service provider, I want guidance/documentation on how to write external update extension for my own use case.
199
201
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
+
200
205
### High level flow
201
206
202
207
```mermaid
@@ -277,6 +282,33 @@ If the combination of the updaters can handle ALL the desired changes then CAPI
277
282
278
283
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.
279
284
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:
| `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
+
280
312
### MachineDeployment updates
281
313
282
314
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.
751
783
- [x] 2024-08: Open proposal [PR](https://github.com/kubernetes-sigs/cluster-api/pull/11029).
752
784
- [x] 2025-04: Proposal merged
753
785
- [x] 2025-12: Update proposal after first implementation
786
+
- [ ] 2026-07: Proposed configurable fallback strategy (fail-closed / predictable rollouts) as a follow-up iteration.
0 commit comments