Skip to content

Commit 5720a6a

Browse files
Drop changes to user facing docs
1 parent b300a78 commit 5720a6a

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
@@ -110,8 +107,6 @@ status: Success # or Failure
110107
message: "error message if status == Failure"
111108
```
112109
113-
For additional details, you can see the full schema in <button onclick="openSwaggerUI()">Swagger UI</button>.
114-
115110
### BeforeClusterUpgrade
116111
117112
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:
140135
...
141136
status:
142137
...
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"
154140
```
155141

156142
#### Example Response:
@@ -163,74 +149,16 @@ message: "error message if status == Failure"
163149
retryAfterSeconds: 10
164150
```
165151

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

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

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

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

371-
Note: The upgrade plan in the request contains only missing steps to reach the target version, if any.
372-
373188
#### Example Response:
374189

375190
```yaml
@@ -380,10 +195,6 @@ message: "error message if status == Failure"
380195
retryAfterSeconds: 10
381196
```
382197

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

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