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
@@ -108,8 +105,6 @@ status: Success # or Failure
108
105
message: "error message if status == Failure"
109
106
```
110
107
111
-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
112
-
113
108
### BeforeClusterUpgrade
114
109
115
110
This hook is called after the Cluster object has been updated with a new `spec.topology.version` by the user, and
@@ -138,17 +133,8 @@ cluster:
138
133
...
139
134
status:
140
135
...
141
-
fromKubernetesVersion: "v1.30.0"
142
-
toKubernetesVersion: "v1.33.0"
143
-
upgradePlan:
144
-
controlPlane:
145
-
- v1.30.0
146
-
- v1.31.0
147
-
- v1.32.3
148
-
- v1.33.0
149
-
workers:
150
-
- v1.32.3
151
-
- v1.33.0
136
+
fromKubernetesVersion: "v1.21.2"
137
+
toKubernetesVersion: "v1.22.0"
152
138
```
153
139
154
140
#### Example Response:
@@ -161,74 +147,16 @@ message: "error message if status == Failure"
161
147
retryAfterSeconds: 10
162
148
```
163
149
164
-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
165
-
166
150
(*) Under normal circumstances `spec.topology.version` gets propagated to the control plane immediately; however
167
151
if previous upgrades or worker machine rollouts are still in progress, the system waits for those operations
168
152
to complete before starting the new upgrade.
169
153
170
-
### BeforeControlPlaneUpgrade
171
-
172
-
This hook is called before a new version is propagated to the control plane object. Runtime Extension implementers
173
-
can use this hook to execute pre-upgrade add-on tasks and block upgrades of the ControlPlane.
174
-
175
-
Note:
176
-
- When an upgrade is starting, BeforeControlPlaneUpgrade will be called after BeforeClusterUpgrade is completed.
177
-
- When an upgrade is in progress BeforeControlPlaneUpgrade will be called for each intermediate version that will
178
-
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>.
222
-
223
154
### AfterControlPlaneUpgrade
224
155
225
-
This hook is called after the control plane has been upgraded to the version specified in `spec.topology.version`
226
-
or to an intermediate version in the upgrade plan and:
227
-
- if workers upgrade can be skipped for this version, immediately before the next intermediate version is applied to the control plane
228
-
- 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.
229
-
230
-
Runtime Extension implementers can use this hook to execute post-upgrade add-on tasks and block upgrades to the next
231
-
version of the control plane or to workers until everything is ready.
156
+
This hook is called after the control plane has been upgraded to the version specified in `spec.topology.version`,
157
+
and immediately before the new version is going to be propagated to the MachineDeployments of the Cluster.
158
+
Runtime Extension implementers can use this hook to execute post-upgrade add-on tasks and block upgrades to workers
159
+
until everything is ready.
232
160
233
161
Note: While the MachineDeployments upgrade is blocked changes made to existing MachineDeployments and creating new MachineDeployments
234
162
will be delayed while the object is waiting for upgrade. Example: modifying MachineDeployments (think scale up),
@@ -252,122 +180,9 @@ cluster:
252
180
...
253
181
status:
254
182
...
255
-
kubernetesVersion: "v1.30.0"
256
-
upgradePlan:
257
-
controlPlane:
258
-
- v1.31.0
259
-
- v1.32.3
260
-
- v1.33.0
261
-
workers:
262
-
- v1.32.3
263
-
- v1.33.0
264
-
```
265
-
266
-
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>.
331
-
332
-
### AfterWorkersUpgrade
333
-
334
-
This hook is called after all the workers have been upgraded to the version specified in `spec.topology.version`
335
-
or to an intermediate version in the upgrade plan, and:
336
-
- if the upgrade plan is completed and the entire cluster is at `spec.topology.version`, immediately before calling the AfterClusterUpgrade hook
337
-
- 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
338
-
339
-
Runtime Extension implementers can use this hook to execute post-upgrade add-on tasks; if the upgrade plan is not completed,
340
-
this hook allows to block upgrades to the next version of the control plane until everything is ready.
0 commit comments