@startuml title User scales up a KubeadmControlPlane actor User ' -- GROUPS START --- box #lightgreen participant "API Server" end box box #violet participant "KubeadmControlPlane Controller" end box ' -- GROUPS END --- User->"API Server":kubectl scale cp/my-control-plane -replicas=3 "API Server"-->>"KubeadmControlPlane Controller": KubeadmControlPlane Updated "KubeadmControlPlane Controller"-> "KubeadmControlPlane Controller":Enqueues KubeadmControlPlane Reconcile "KubeadmControlPlane Controller"-> "KubeadmControlPlane Controller":KubeadmControlPlane Controller Reconcile activate "KubeadmControlPlane Controller" note over "KubeadmControlPlane Controller": - ✅ KubeadmControlPlane.OwnerReferences \ncontains a Cluster "KubeadmControlPlane Controller"->"API Server": Get Cluster "KubeadmControlPlane Controller"<<--"API Server": Response note over "KubeadmControlPlane Controller": - ✅ Cluster.Status.InfrastructureReady is true\n- ✅ KubeadmControlPlane instance is valid "KubeadmControlPlane Controller"->"API Server": Get Machines matching label selector "KubeadmControlPlane Controller"<<--"API Server": Response opt #FFFFFFCC KubeadmControlPlane.Spec.Replicas >= 1, all existing Machines "Ready", num Machines < Replicas "KubeadmControlPlane Controller"->"API Server": Create KubeadmConfig from KubeadmControlPlane.Spec.KubeadmConfigSpec "KubeadmControlPlane Controller"<<--"API Server": Response "KubeadmControlPlane Controller"->"API Server": Create InfrastructureMachine from KubeadmControlPlane.Spec.InfrastructureTemplate "KubeadmControlPlane Controller"<<--"API Server": Response "KubeadmControlPlane Controller"->"API Server": Create Machine using refs from created KubeadmConfig and InfrastructureMachine resources "KubeadmControlPlane Controller"<<--"API Server": Response end "KubeadmControlPlane Controller"->"API Server": Update KubeadmControlPlane "KubeadmControlPlane Controller"<<--"API Server": Response hide footbox @enduml