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
Copy file name to clipboardExpand all lines: docs/proposals/20220414-lifecycle-hooks.md
+39-50Lines changed: 39 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,15 +155,13 @@ cluster:
155
155
...
156
156
fromKubernetesVersion: "v1.30.0"
157
157
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
167
165
```
168
166
169
167
#### BeforeControlPlaneUpgrade (new hook)
@@ -194,15 +192,13 @@ cluster:
194
192
...
195
193
fromKubernetesVersion: "v1.30.0"
196
194
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
206
202
```
207
203
208
204
Note: The upgrade plan in the request contains only missing steps to reach the target version.
@@ -250,14 +246,13 @@ cluster:
250
246
status:
251
247
...
252
248
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
261
256
```
262
257
263
258
Note: The upgrade plan in the request contains only missing steps to reach the target version, if any.
@@ -299,15 +294,13 @@ cluster:
299
294
...
300
295
fromKubernetesVersion: "v1.30.0"
301
296
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
311
304
```
312
305
313
306
Note: The upgrade plan in the request contains only missing steps to reach the target version.
@@ -326,11 +319,10 @@ retryAfterSeconds: 10
326
319
327
320
This hook is called after all the workers have been upgraded to the version specified in `spec.topology.version`
328
321
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.
334
326
335
327
##### Example Request:
336
328
@@ -349,14 +341,13 @@ cluster:
349
341
status:
350
342
...
351
343
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
360
351
```
361
352
362
353
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"
371
362
retryAfterSeconds: 10
372
363
```
373
364
374
-
Note: retryAfterSeconds is ignored when workers version is equal to `spec.topology.version`.
375
-
376
365
### Runtime Extensions developer guide
377
366
378
367
This section has been moved to the Cluster API [book](../../docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md#guidelines)
0 commit comments