Skip to content

Commit 82a8a62

Browse files
Drop changes to user facing docs
1 parent 5b1a12b commit 82a8a62

File tree

4 files changed

+257
-208
lines changed

4 files changed

+257
-208
lines changed
-221 KB
Loading

docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md

Lines changed: 8 additions & 207 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ The lifecycle hooks allow hooking into the Cluster lifecycle. The following diag
1414

1515
![Lifecycle Hooks overview](../../../images/runtime-sdk-lifecycle-hooks.png)
1616

17-
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)
1918
for additional background information.
2019

2120
## Guidelines
@@ -70,8 +69,6 @@ message: "error message if status == Failure"
7069
retryAfterSeconds: 10
7170
```
7271
73-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
74-
7572
(*) The objects which are part of a Cluster topology are the infrastructure Cluster, the Control Plane, the
7673
MachineDeployments and the templates derived from the ClusterClass.
7774
@@ -108,8 +105,6 @@ status: Success # or Failure
108105
message: "error message if status == Failure"
109106
```
110107
111-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
112-
113108
### BeforeClusterUpgrade
114109
115110
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:
138133
...
139134
status:
140135
...
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"
152138
```
153139

154140
#### Example Response:
@@ -161,74 +147,16 @@ message: "error message if status == Failure"
161147
retryAfterSeconds: 10
162148
```
163149

164-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
165-
166150
(*) Under normal circumstances `spec.topology.version` gets propagated to the control plane immediately; however
167151
if previous upgrades or worker machine rollouts are still in progress, the system waits for those operations
168152
to complete before starting the new upgrade.
169153

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).
179-
180-
#### Example Request:
181-
182-
```yaml
183-
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
184-
kind: BeforeControlPlaneUpgradeRequest
185-
settings: <Runtime Extension settings>
186-
cluster:
187-
apiVersion: cluster.x-k8s.io/v1beta1
188-
kind: Cluster
189-
metadata:
190-
name: test-cluster
191-
namespace: test-ns
192-
spec:
193-
...
194-
status:
195-
...
196-
fromKubernetesVersion: "v1.30.0"
197-
toKubernetesVersion: "v1.33.0"
198-
upgradePlan:
199-
controlPlane:
200-
- v1.30.0
201-
- v1.31.0
202-
- v1.32.3
203-
- v1.33.0
204-
workers:
205-
- v1.32.3
206-
- v1.33.0
207-
```
208-
209-
Note: The upgrade plan in the request contains only missing steps to reach the target version.
210-
211-
#### Example Response:
212-
213-
```yaml
214-
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
215-
kind: BeforeControlPlaneUpgradeResponse
216-
status: Success # or Failure
217-
message: "error message if status == Failure"
218-
retryAfterSeconds: 10
219-
```
220-
221-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
222-
223154
### AfterControlPlaneUpgrade
224155

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.
232160

233161
Note: While the MachineDeployments upgrade is blocked changes made to existing MachineDeployments and creating new MachineDeployments
234162
will be delayed while the object is waiting for upgrade. Example: modifying MachineDeployments (think scale up),
@@ -252,122 +180,9 @@ cluster:
252180
...
253181
status:
254182
...
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.
267-
268-
#### Example Response:
269-
270-
```yaml
271-
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
272-
kind: AfterControlPlaneUpgradeResponse
273-
status: Success # or Failure
274-
message: "error message if status == Failure"
275-
retryAfterSeconds: 10
276-
```
277-
278-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
279-
280-
### BeforeWorkersUpgrade
281-
282-
This hook is called before a new version is propagated to workers. Runtime Extension implementers
283-
can use this hook to execute pre-upgrade add-on tasks and block upgrades of Workers.
284-
285-
Note:
286-
- This hook will be called only if workers upgrade must be performed for an intermediate version of of a chained upgrade
287-
or when upgrading to the target `spec.topology.version`.
288-
289-
#### Example Request:
290-
291-
```yaml
292-
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
293-
kind: BeforeWorkersUpgradeRequest
294-
settings: <Runtime Extension settings>
295-
cluster:
296-
apiVersion: cluster.x-k8s.io/v1beta1
297-
kind: Cluster
298-
metadata:
299-
name: test-cluster
300-
namespace: test-ns
301-
spec:
302-
...
303-
status:
304-
...
305-
fromKubernetesVersion: "v1.30.0"
306-
toKubernetesVersion: "v1.33.0"
307-
upgradePlan:
308-
controlPlane:
309-
- v1.30.0
310-
- v1.31.0
311-
- v1.32.3
312-
- v1.33.0
313-
workers:
314-
- v1.32.3
315-
- v1.33.0
316-
```
317-
318-
Note: The upgrade plan in the request contains only missing steps to reach the target version.
319-
320-
#### Example Response:
321-
322-
```yaml
323-
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
324-
kind: BeforeControlPlaneUpgradeResponse
325-
status: Success # or Failure
326-
message: "error message if status == Failure"
327-
retryAfterSeconds: 10
328-
```
329-
330-
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.
341-
342-
#### Example Request:
343-
344-
```yaml
345-
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
346-
kind: AfterWorkersRequest
347-
settings: <Runtime Extension settings>
348-
cluster:
349-
apiVersion: cluster.x-k8s.io/v1beta1
350-
kind: Cluster
351-
metadata:
352-
name: test-cluster
353-
namespace: test-ns
354-
spec:
355-
...
356-
status:
357-
...
358-
kubernetesVersion: "v1.30.0"
359-
upgradePlan:
360-
controlPlane:
361-
- v1.31.0
362-
- v1.32.3
363-
- v1.33.0
364-
workers:
365-
- v1.32.3
366-
- v1.33.0
183+
kubernetesVersion: "v1.22.0"
367184
```
368185

369-
Note: The upgrade plan in the request contains only missing steps to reach the target version, if any.
370-
371186
#### Example Response:
372187

373188
```yaml
@@ -378,10 +193,6 @@ message: "error message if status == Failure"
378193
retryAfterSeconds: 10
379194
```
380195

381-
Note: retryAfterSeconds is ignored when workers version is equal to `spec.topology.version`.
382-
383-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
384-
385196
### AfterClusterUpgrade
386197

387198
This hook is called after the Cluster, control plane and workers have been upgraded to the version specified in
@@ -449,13 +260,3 @@ status: Success # or Failure
449260
message: "error message if status == Failure"
450261
retryAfterSeconds: 10
451262
```
452-
453-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
454-
455-
<script>
456-
// openSwaggerUI calculates the absolute URL of the RuntimeSDK YAML file and opens Swagger UI.
457-
function openSwaggerUI() {
458-
var schemaURL = new URL("runtime-sdk-openapi.yaml", document.baseURI).href
459-
window.open("https://editor.swagger.io/?url=" + schemaURL)
460-
}
461-
</script>

docs/book/src/tasks/experimental-features/runtime-sdk/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Additional documentation:
2626
* Background information:
2727
* [Runtime SDK CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220221-runtime-SDK.md)
2828
* [Topology Mutation Hook CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220330-topology-mutation-hook.md)
29-
* [Runtime Hooks for Add-on Management CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220414-lifecycle-hooks.md)
29+
* [Runtime Hooks for Add-on Management CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220414-runtime-hooks.md)
3030
* For Runtime Extension developers:
3131
* [Implementing Runtime Extensions](./implement-extensions.md)
3232
* [Implementing Lifecycle Hook Extensions](./implement-lifecycle-hooks.md)

0 commit comments

Comments
 (0)