sigs.k8s.io/cluster-api@v1.7.1/docs/proposals/images/controlplane/controlplane-init-7.plantuml (about) 1 @startuml 2 title User scales down a KubeadmControlPlane 3 actor User 4 5 ' -- GROUPS START --- 6 7 box #lightgreen 8 participant "API Server" 9 end box 10 11 box #violet 12 participant "KubeadmControlPlane Controller" 13 end box 14 15 box #lightgreen 16 participant "Workload Cluster API Server" 17 end box 18 19 ' -- GROUPS END --- 20 21 User->"API Server":kubectl scale cp/my-control-plane -replicas=1 22 "API Server"-->>"KubeadmControlPlane Controller": KubeadmControlPlane Updated 23 24 "KubeadmControlPlane Controller"-> "KubeadmControlPlane Controller":Enqueues KubeadmControlPlane Reconcile 25 26 "KubeadmControlPlane Controller"-> "KubeadmControlPlane Controller":KubeadmControlPlane Controller Reconcile 27 activate "KubeadmControlPlane Controller" 28 29 note over "KubeadmControlPlane Controller": - ✅ KubeadmControlPlane.OwnerReferences \ncontains a Cluster 30 31 "KubeadmControlPlane Controller"->"API Server": Get Cluster 32 "KubeadmControlPlane Controller"<<--"API Server": Response 33 34 note over "KubeadmControlPlane Controller": - ✅ Cluster.Status.InfrastructureReady is true\n- ✅ KubeadmControlPlane instance is valid 35 36 "KubeadmControlPlane Controller"->"API Server": Get Machines matching label selector 37 "KubeadmControlPlane Controller"<<--"API Server": Response 38 39 note over "KubeadmControlPlane Controller": - Process for selecting a Machine to delete is TBD 40 41 opt #FFFFFFCC KubeadmControlPlane.Spec.Replicas >= 1, all existing Machines "Ready", num Machines > Replicas 42 43 "KubeadmControlPlane Controller"->"Workload Cluster API Server": Remove etcd Member 44 45 "KubeadmControlPlane Controller"->"Workload Cluster API Server": Modify kubeadm ConfigMap 46 47 "KubeadmControlPlane Controller"->"API Server": Delete a Machine 48 49 end 50 51 "KubeadmControlPlane Controller"->"API Server": Update KubeadmControlPlane 52 "KubeadmControlPlane Controller"<<--"API Server": Response 53 54 hide footbox 55 @enduml