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/book/src/developer/providers/contracts/control-plane.md
+30-2Lines changed: 30 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,7 @@ repo or add an item to the agenda in the [Cluster API community meeting](https:/
68
68
|[ControlPlane: version]| No | Mandatory if control plane allows direct management of the Kubernetes version in use; Mandatory for cluster class support. |
69
69
|[ControlPlane: machines]| No | Mandatory if control plane instances are represented with a set of Cluster API Machines. |
70
70
|[ControlPlane: initialization completed]| Yes ||
71
+
|[ControlPlane: in-place updates]| No | Only supported for control plane providers with control plane machines |
71
72
|[ControlPlane: conditions]| No ||
72
73
|[ControlPlane: terminal failures]| No ||
73
74
|[ControlPlaneTemplate, ControlPlaneTemplateList resource definition]| No | Mandatory for ClusterClasses support |
@@ -616,8 +617,34 @@ the ControlPlane resource will be ignored.
616
617
617
618
</aside>
618
619
619
-
### ControlPlane: conditions
620
+
### ControlPlane: in-place updates
621
+
622
+
In case a control plane provider would like to provide support for in-place updates, please check the [proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/20240807-in-place-updates.md).
623
+
624
+
Supporting in-place updates requires:
625
+
- implementing the call for the registered `CanUpdateMachine` hook when performing the "can update in-place" decision.
626
+
- when it is decided to perform the in-place decision:
627
+
- the machine spec must be updated to the desired state, as well as the spec for the corresponding infrastructure machine and bootstrap config
628
+
- while updating those objects also the `in-place-updates.internal.cluster.x-k8s.io/update-in-progress` annotation must be set
629
+
- once all objects are updated the `UpdateMachine` hook must be set as pending on the machine object
630
+
631
+
After above steps are completed, the machine controller will take over and complete the in-place upgrade.
632
+
633
+
<asideclass="note warning">
634
+
635
+
<h1>High complexity</h1>
620
636
637
+
Implementing the in-place update transition in a race condition free, re-entrant way is more complex that it might seem.
638
+
639
+
Please read the proposal's [implementation notes](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240807-in-place-updates-implementation-notes.md)
640
+
carefully.
641
+
642
+
Also, it is highly recommended to use the KCP implementation as a reference.
643
+
644
+
</aside>
645
+
646
+
647
+
### ControlPlane: conditions
621
648
622
649
According to [Kubernetes API Conventions], Conditions provide a standard mechanism for higher-level
623
650
status reporting from a controller.
@@ -873,7 +900,8 @@ is implemented in ControlPlane controllers:
873
900
[ControlPlane: machines]: #controlplane-machines
874
901
[In place propagation of changes affecting Kubernetes objects only]: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20221003-In-place-propagation-of-Kubernetes-objects-only-changes.md
[Kubernetes API Conventions]: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
879
907
[Improving status in CAPI resources]: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md
0 commit comments