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
Please see the corresponding [proposal: Runtime hooks for Add-on Management (lifecycle hooks)](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220414-lifecycle-hooks.md) and
18
-
also [proposal: Chained and efficient upgrades for Clusters with managed topologies](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md)]
17
+
Please see the corresponding [CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220414-runtime-hooks.md)
19
18
for additional background information.
20
19
21
20
## Guidelines
@@ -70,8 +69,6 @@ message: "error message if status == Failure"
70
69
retryAfterSeconds: 10
71
70
```
72
71
73
-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
74
-
75
72
(*) The objects which are part of a Cluster topology are the infrastructure Cluster, the Control Plane, the
76
73
MachineDeployments and the templates derived from the ClusterClass.
77
74
@@ -110,8 +107,6 @@ status: Success # or Failure
110
107
message: "error message if status == Failure"
111
108
```
112
109
113
-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
114
-
115
110
### BeforeClusterUpgrade
116
111
117
112
This hook is called after the Cluster object has been updated with a new `spec.topology.version` by the user, and
@@ -140,17 +135,8 @@ cluster:
140
135
...
141
136
status:
142
137
...
143
-
fromKubernetesVersion: "v1.30.0"
144
-
toKubernetesVersion: "v1.33.0"
145
-
upgradePlan:
146
-
controlPlane:
147
-
- v1.30.0
148
-
- v1.31.0
149
-
- v1.32.3
150
-
- v1.33.0
151
-
workers:
152
-
- v1.32.3
153
-
- v1.33.0
138
+
fromKubernetesVersion: "v1.21.2"
139
+
toKubernetesVersion: "v1.22.0"
154
140
```
155
141
156
142
#### Example Response:
@@ -163,74 +149,16 @@ message: "error message if status == Failure"
163
149
retryAfterSeconds: 10
164
150
```
165
151
166
-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
167
-
168
152
(*) Under normal circumstances `spec.topology.version` gets propagated to the control plane immediately; however
169
153
if previous upgrades or worker machine rollouts are still in progress, the system waits for those operations
170
154
to complete before starting the new upgrade.
171
155
172
-
### BeforeControlPlaneUpgrade
173
-
174
-
This hook is called before a new version is propagated to the control plane object. Runtime Extension implementers
175
-
can use this hook to execute pre-upgrade add-on tasks and block upgrades of the ControlPlane.
176
-
177
-
Note:
178
-
- When an upgrade is starting, BeforeControlPlaneUpgrade will be called after BeforeClusterUpgrade is completed.
179
-
- When an upgrade is in progress BeforeControlPlaneUpgrade will be called for each intermediate version that will
180
-
be applied to the control plane (instead BeforeClusterUpgrade will be called only once at the beginning of the upgrade).
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
224
-
225
156
### AfterControlPlaneUpgrade
226
157
227
-
This hook is called after the entire control plane has been upgraded to the version specified in `spec.topology.version`
228
-
or to an intermediate version in the upgrade plan and:
229
-
- if workers upgrade can be skipped for this version, immediately before the next intermediate version is applied to the control plane
230
-
- if workers upgrade must be performed for this version, immediately before the new version is going to be propagated to the MachineDeployments of the Cluster.
231
-
232
-
Runtime Extension implementers can use this hook to execute post-upgrade add-on tasks and block upgrades to the next
233
-
version of the control plane or to workers until everything is ready.
158
+
This hook is called after the entire control plane has been upgraded to the version specified in `spec.topology.version`,
159
+
and immediately before the new version is going to be propagated to the MachineDeployments of the Cluster.
160
+
Runtime Extension implementers can use this hook to execute post-upgrade add-on tasks and block upgrades to workers
161
+
until everything is ready.
234
162
235
163
Note: While the MachineDeployments upgrade is blocked changes made to existing MachineDeployments and creating new MachineDeployments
236
164
will be delayed while the object is waiting for upgrade. Example: modifying MachineDeployments (think scale up),
@@ -254,122 +182,9 @@ cluster:
254
182
...
255
183
status:
256
184
...
257
-
kubernetesVersion: "v1.30.0"
258
-
upgradePlan:
259
-
controlPlane:
260
-
- v1.31.0
261
-
- v1.32.3
262
-
- v1.33.0
263
-
workers:
264
-
- v1.32.3
265
-
- v1.33.0
266
-
```
267
-
268
-
Note: The upgrade plan in the request contains only missing steps to reach the target version, if any.
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
333
-
334
-
### AfterWorkersUpgrade
335
-
336
-
This hook is called after all the workers have been upgraded to the version specified in `spec.topology.version`
337
-
or to an intermediate version in the upgrade plan, and:
338
-
- if the upgrade plan is completed and the entire cluster is at `spec.topology.version`, immediately before calling the AfterClusterUpgrade hook
339
-
- 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
340
-
341
-
Runtime Extension implementers can use this hook to execute post-upgrade add-on tasks; if the upgrade plan is not completed,
342
-
this hook allows to block upgrades to the next version of the control plane until everything is ready.
0 commit comments