-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1613 from detiber/controlPlaneCAEP
📖 CAEP: ControlPlane
- Loading branch information
Showing
14 changed files
with
874 additions
and
27 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
docs/proposals/images/controlplane/controlplane-init-1.plantuml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@startuml | ||
title User creates a Cluster with KubeadmControlPlane | ||
actor User | ||
|
||
' -- GROUPS START --- | ||
|
||
box #lightgreen | ||
participant "API Server" | ||
end box | ||
|
||
box #lightslategray | ||
participant "Cluster API Cluster Controller" | ||
end box | ||
|
||
' -- GROUPS END --- | ||
|
||
User->"API Server":kubectl apply -f cluster.yaml | ||
"API Server"-->>"Cluster API Cluster Controller": New Cluster | ||
|
||
"Cluster API Cluster Controller"-> "Cluster API Cluster Controller":Cluster Controller Reconcile | ||
activate "Cluster API Cluster Controller" | ||
|
||
note over "Cluster API Cluster Controller": - ✅ Cluster.Status.InfrastructureReady is false\n- ✅ Cluster.Spec.ControlPlaneRef is populated\n- ✅ Cluster.Spec.ControlPlaneRef -> Status.Ready is false | ||
|
||
opt Required only if the object hasn't been seen before | ||
"Cluster API Cluster Controller"-> "Cluster API Cluster Controller":Add watcher for \nCluster.Spec.ControlPlaneRef.Kind objects | ||
end | ||
|
||
opt Required only if the infrastructure object doesn't have a Cluster owner reference | ||
"Cluster API Cluster Controller"-> "Cluster API Cluster Controller":Set Cluster.Spec.InfrastructureRef -> OwnerReferences[0] to Cluster | ||
"Cluster API Cluster Controller"->"API Server": Patch AWSCluster | ||
"Cluster API Cluster Controller"<<--"API Server": Response | ||
end | ||
|
||
opt Required only if the control plane object doesn't have a Cluster owner reference | ||
"Cluster API Cluster Controller"-> "Cluster API Cluster Controller":Set Cluster.Spec.ControlPlaneRef -> OwnerReferences[0] to Cluster | ||
"Cluster API Cluster Controller"->"API Server": Patch KubeadmControlPlane | ||
"Cluster API Cluster Controller"<<--"API Server": Response | ||
end | ||
|
||
"Cluster API Cluster Controller"->"API Server": Patch Cluster Status | ||
"Cluster API Cluster Controller"<<--"API Server": Response | ||
|
||
deactivate "Cluster API Cluster Controller" | ||
|
||
hide footbox | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions
52
docs/proposals/images/controlplane/controlplane-init-2.plantuml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
@startuml | ||
title User creates a Cluster with KubeadmControlPlane | ||
|
||
' -- GROUPS START --- | ||
|
||
box #lightgreen | ||
participant "API Server" | ||
end box | ||
|
||
box #violet | ||
participant "KubeadmControlPlane Controller" | ||
end box | ||
|
||
' -- GROUPS END --- | ||
|
||
note right of "KubeadmControlPlane Controller":Watches KubeadmControlPlanes,\nClusters, and owned Machines | ||
|
||
"API Server"-->>"KubeadmControlPlane Controller": Cluster 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 maching label selector | ||
"KubeadmControlPlane Controller"<<--"API Server": Response | ||
|
||
opt KubeadmControlPlane.Spec.Replicas >= 1, no existing Machines found | ||
|
||
"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": Patch KubeadmControlPlane | ||
"KubeadmControlPlane Controller"<<--"API Server": Response | ||
|
||
hide footbox | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions
51
docs/proposals/images/controlplane/controlplane-init-3.plantuml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
@startuml | ||
title User creates a Cluster with KubeadmControlPlane | ||
|
||
' -- GROUPS START --- | ||
|
||
box #lightgreen | ||
participant "API Server" | ||
end box | ||
|
||
box #violet | ||
participant "KubeadmControlPlane Controller" | ||
end box | ||
|
||
' -- GROUPS END --- | ||
|
||
note right of "KubeadmControlPlane Controller":Watches KubeadmControlPlanes,\nClusters, and owned Machines | ||
|
||
"API Server"-->>"KubeadmControlPlane Controller": Machine 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 maching label selector | ||
"KubeadmControlPlane Controller"<<--"API Server": Response | ||
|
||
opt KubeadmControlPlane.Spec.Replicas >= 1, 1 or more existing Machines found that is "Ready" | ||
|
||
"KubeadmControlPlane Controller"-> "KubeadmControlPlane Controller":Set KubeadmControlPlane.Status.Initialized = true | ||
|
||
opt num Machines matches Replicas, and all Machines "Ready" | ||
|
||
"KubeadmControlPlane Controller"-> "KubeadmControlPlane Controller":Set KubeadmControlPlane.Status.Ready = true | ||
|
||
end | ||
|
||
end | ||
|
||
"KubeadmControlPlane Controller"->"API Server": Patch KubeadmControlPlane | ||
"KubeadmControlPlane Controller"<<--"API Server": Response | ||
|
||
hide footbox | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions
39
docs/proposals/images/controlplane/controlplane-init-4.plantuml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@startuml | ||
title User creates a Cluster with KubeadmControlPlane | ||
|
||
' -- GROUPS START --- | ||
|
||
box #lightgreen | ||
participant "API Server" | ||
end box | ||
|
||
box #lightslategray | ||
participant "Cluster API Cluster Controller" | ||
end box | ||
|
||
' -- GROUPS END --- | ||
|
||
"API Server"-->>"Cluster API Cluster Controller": KubeadmControlPlane updated | ||
|
||
"Cluster API Cluster Controller"-> "Cluster API Cluster Controller":Cluster Controller Reconcile | ||
activate "Cluster API Cluster Controller" | ||
|
||
opt Cluster.Spec.ControlPlaneRef -> Status.Initialized is true | ||
|
||
"Cluster API Cluster Controller"-> "Cluster API Cluster Controller":Set Cluster.Status.ControlPlaneInitialized = true | ||
|
||
opt Cluster.Spec.ControlPlaneRef -> Status.Ready is true | ||
|
||
"Cluster API Cluster Controller"-> "Cluster API Cluster Controller":Set Cluster.Status.ControlPlaneReady = true | ||
|
||
end | ||
|
||
end | ||
|
||
"Cluster API Cluster Controller"->"API Server": Patch Cluster Status | ||
"Cluster API Cluster Controller"<<--"API Server": Response | ||
|
||
deactivate "Cluster API Cluster Controller" | ||
|
||
hide footbox | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions
52
docs/proposals/images/controlplane/controlplane-init-6.plantuml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
@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 maching label selector | ||
"KubeadmControlPlane Controller"<<--"API Server": Response | ||
|
||
opt 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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions
55
docs/proposals/images/controlplane/controlplane-init-7.plantuml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
@startuml | ||
title User scales down a KubeadmControlPlane | ||
actor User | ||
|
||
' -- GROUPS START --- | ||
|
||
box #lightgreen | ||
participant "API Server" | ||
end box | ||
|
||
box #violet | ||
participant "KubeadmControlPlane Controller" | ||
end box | ||
|
||
box #lightgreen | ||
participant "Workload Cluster API Server" | ||
end box | ||
|
||
' -- GROUPS END --- | ||
|
||
User->"API Server":kubectl scale cp/my-control-plane -replicas=1 | ||
"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 maching label selector | ||
"KubeadmControlPlane Controller"<<--"API Server": Response | ||
|
||
note over "KubeadmControlPlane Controller": - Process for selecting a Machine to delete is TBD | ||
|
||
opt KubeadmControlPlane.Spec.Replicas >= 1, all existing Machines "Ready", num Machines > Replicas | ||
|
||
"KubeadmControlPlane Controller"->"Workload Cluster API Server": Remove etcd Member | ||
|
||
"KubeadmControlPlane Controller"->"Workload Cluster API Server": Modify kubeadm ConfigMap | ||
|
||
"KubeadmControlPlane Controller"->"API Server": Delete a Machine | ||
|
||
end | ||
|
||
"KubeadmControlPlane Controller"->"API Server": Update KubeadmControlPlane | ||
"KubeadmControlPlane Controller"<<--"API Server": Response | ||
|
||
hide footbox | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.