Skip to content

Commit f283af9

Browse files
More feedback
1 parent 46c4a9d commit f283af9

File tree

2 files changed

+44
-52
lines changed

2 files changed

+44
-52
lines changed

docs/proposals/20220414-lifecycle-hooks.md

Lines changed: 39 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,13 @@ cluster:
155155
...
156156
fromKubernetesVersion: "v1.30.0"
157157
toKubernetesVersion: "v1.33.0"
158-
upgradePlan:
159-
controlPlane:
160-
- v1.30.0
161-
- v1.31.0
162-
- v1.32.3
163-
- v1.33.0
164-
workers:
165-
- v1.32.3
166-
- v1.33.0
158+
controlPlaneUpgrades:
159+
- version: v1.31.0
160+
- version: v1.32.3
161+
- version: v1.33.0
162+
workersUpgrades:
163+
- version: v1.32.3
164+
- version: v1.33.0
167165
```
168166
169167
#### BeforeControlPlaneUpgrade (new hook)
@@ -194,15 +192,13 @@ cluster:
194192
...
195193
fromKubernetesVersion: "v1.30.0"
196194
toKubernetesVersion: "v1.33.0"
197-
upgradePlan:
198-
controlPlane:
199-
- v1.30.0
200-
- v1.31.0
201-
- v1.32.3
202-
- v1.33.0
203-
workers:
204-
- v1.32.3
205-
- v1.33.0
195+
controlPlaneUpgrades:
196+
- version: v1.31.0
197+
- version: v1.32.3
198+
- version: v1.33.0
199+
workersUpgrades:
200+
- version: v1.32.3
201+
- version: v1.33.0
206202
```
207203
208204
Note: The upgrade plan in the request contains only missing steps to reach the target version.
@@ -250,14 +246,13 @@ cluster:
250246
status:
251247
...
252248
kubernetesVersion: "v1.30.0"
253-
upgradePlan:
254-
controlPlane:
255-
- v1.31.0
256-
- v1.32.3
257-
- v1.33.0
258-
workers:
259-
- v1.32.3
260-
- v1.33.0
249+
controlPlaneUpgrades:
250+
- version: v1.31.0
251+
- version: v1.32.3
252+
- version: v1.33.0
253+
workersUpgrades:
254+
- version: v1.32.3
255+
- version: v1.33.0
261256
```
262257

263258
Note: The upgrade plan in the request contains only missing steps to reach the target version, if any.
@@ -299,15 +294,13 @@ cluster:
299294
...
300295
fromKubernetesVersion: "v1.30.0"
301296
toKubernetesVersion: "v1.33.0"
302-
upgradePlan:
303-
controlPlane:
304-
- v1.30.0
305-
- v1.31.0
306-
- v1.32.3
307-
- v1.33.0
308-
workers:
309-
- v1.32.3
310-
- v1.33.0
297+
controlPlaneUpgrades:
298+
- version: v1.31.0
299+
- version: v1.32.3
300+
- version: v1.33.0
301+
workersUpgrades:
302+
- version: v1.32.3
303+
- version: v1.33.0
311304
```
312305

313306
Note: The upgrade plan in the request contains only missing steps to reach the target version.
@@ -326,11 +319,10 @@ retryAfterSeconds: 10
326319

327320
This hook is called after all the workers have been upgraded to the version specified in `spec.topology.version`
328321
or to an intermediate version in the upgrade plan, and:
329-
- if the upgrade plan is completed and the entire cluster is at `spec.topology.version`, immediately before calling the AfterClusterUpgrade hook
330-
- if the upgrade plan is not complete and the entire cluster is now at one of the intermediate versions, immediately before calling BeforeControlPlaneUpgrade hook for the next intermediate step
331-
332-
Runtime Extension implementers can use this hook to execute post-upgrade add-on tasks; if the upgrade plan is not completed,
333-
this hook allows to block upgrades to the next version of the control plane until everything is ready.
322+
- if the upgrade plan is completed and the entire cluster is at `spec.topology.version`, immediately before calling the AfterClusterUpgrade hook;
323+
in this case, the hook will ensure a new upgrade can't start until `AfterWorkersUpgrade` is completed.
324+
- if the upgrade plan is not complete and the entire cluster is now at one of the intermediate versions, immediately before calling BeforeControlPlaneUpgrade hook for the next intermediate step;
325+
in this case, the hook will ensure the control can't to move to the next version in the upgrade plan until `AfterWorkersUpgrade` is completed.
334326

335327
##### Example Request:
336328

@@ -349,14 +341,13 @@ cluster:
349341
status:
350342
...
351343
kubernetesVersion: "v1.30.0"
352-
upgradePlan:
353-
controlPlane:
354-
- v1.31.0
355-
- v1.32.3
356-
- v1.33.0
357-
workers:
358-
- v1.32.3
359-
- v1.33.0
344+
controlPlaneUpgrades:
345+
- version: v1.31.0
346+
- version: v1.32.3
347+
- version: v1.33.0
348+
workersUpgrades:
349+
- version: v1.32.3
350+
- version: v1.33.0
360351
```
361352

362353
Note: The upgrade plan in the request contains only missing steps to reach the target version, if any.
@@ -371,8 +362,6 @@ message: "error message if status == Failure"
371362
retryAfterSeconds: 10
372363
```
373364

374-
Note: retryAfterSeconds is ignored when workers version is equal to `spec.topology.version`.
375-
376365
### Runtime Extensions developer guide
377366

378367
This section has been moved to the Cluster API [book](../../docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md#guidelines)

docs/proposals/20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,11 @@ More specifically:
332332
- A new `BeforeWorkersUpgrade` hook will be added and called before each "upgrade workers" step;
333333
request and response payload will be similar to corresponding messages for `BeforeControlPlaneUpgrade`
334334
- A new `AfterWorkersUpgrade` hook will be added and called after each "upgrade workers" step;
335-
request and response payload will be similar to corresponding messages for `AfterControlPlaneUpgrade`, but the
336-
hook will be considered blocking only for the intermediate steps of the upgrade.
335+
request and response payload will be similar to corresponding messages for `AfterControlPlaneUpgrade`
336+
- if the upgrade plan is completed and the entire cluster is at `spec.topology.version`, the hook
337+
will ensure a new upgrade can't start until `AfterWorkersUpgrade` is completed.
338+
- if the upgrade plan is not complete and the entire cluster is now at one of the intermediate versions,
339+
the hook will ensure the control can't to move to the next version in the upgrade plan until `AfterWorkersUpgrade` is completed.
337340
- `AfterClusterUpgrade` will remain as of today, but the system will ensure that a new upgrade
338341
can't start until `AfterClusterUpgrade` is completed.
339342

0 commit comments

Comments
 (0)