-
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.
- Loading branch information
Showing
14 changed files
with
804 additions
and
27 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
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,53 @@ | ||
@startuml | ||
title User creates a Cluster with ControlPlane | ||
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.InfrastructureRef.Kind objects | ||
end | ||
|
||
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 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 AWSInfrastructureConfig | ||
"Cluster API Cluster Controller"<<--"API Server": Response | ||
end | ||
|
||
opt Required only if the object doesn't have a Machine 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 ControlPlane | ||
"Cluster API Cluster Controller"<<--"API Server": Response | ||
end | ||
|
||
"Cluster API Cluster Controller"-> "Cluster API Cluster Controller":Set Cluster.Status.Phase = "Pending" | ||
|
||
"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.
54 changes: 54 additions & 0 deletions
54
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,54 @@ | ||
@startuml | ||
title User creates a Cluster with ControlPlane | ||
|
||
' -- GROUPS START --- | ||
|
||
box #lightgreen | ||
participant "API Server" | ||
end box | ||
|
||
box #violet | ||
participant "ControlPlane Controller" | ||
end box | ||
|
||
' -- GROUPS END --- | ||
|
||
note right of "ControlPlane Controller":Watches ControlPlane,\nCluster, and Machine events with mapFunc | ||
|
||
"API Server"-->>"ControlPlane Controller": Cluster Updated | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":Enqueues ControlPlane Reconcile | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":ControlPlane Controller Reconcile | ||
activate "ControlPlane Controller" | ||
|
||
note over "ControlPlane Controller": - ✅ ControlPlane.OwnerReferences \ncontains a Cluster | ||
|
||
"ControlPlane Controller"->"API Server": Get Cluster | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
note over "ControlPlane Controller": - ✅ Cluster.Status.InfraStructureReady is true\n- ✅ ControlPlane instance is valid | ||
|
||
"ControlPlane Controller"->"API Server": Get Machines maching label selector | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
opt ControlPlane.Spec.Replicas >= 1, no existing Machines found | ||
|
||
"ControlPlane Controller"->"API Server": Create KubeadmConfig from ControlPlane.Spec.KubeadmConfigSpec | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
"ControlPlane Controller"->"API Server": Create InfrastructureMachine from ControlPlane.Spec.InfrastructureTemplate | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
"ControlPlane Controller"->"API Server": Create Machine using refs from created KubeadmConfig and InfrastructureMachine resources | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":Set ControlPlane.Status.Phase = "Pending" | ||
|
||
end | ||
|
||
"ControlPlane Controller"->"API Server": Patch ControlPlane | ||
"ControlPlane 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.
53 changes: 53 additions & 0 deletions
53
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,53 @@ | ||
@startuml | ||
title User creates a Cluster with ControlPlane | ||
|
||
' -- GROUPS START --- | ||
|
||
box #lightgreen | ||
participant "API Server" | ||
end box | ||
|
||
box #violet | ||
participant "ControlPlane Controller" | ||
end box | ||
|
||
' -- GROUPS END --- | ||
|
||
note right of "ControlPlane Controller":Watches ControlPlane,\nCluster, and Machine events with mapFunc | ||
|
||
"API Server"-->>"ControlPlane Controller": Machine Updated | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":Enqueues ControlPlane Reconcile | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":ControlPlane Controller Reconcile | ||
activate "ControlPlane Controller" | ||
|
||
note over "ControlPlane Controller": - ✅ ControlPlane.OwnerReferences \ncontains a Cluster | ||
|
||
"ControlPlane Controller"->"API Server": Get Cluster | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
note over "ControlPlane Controller": - ✅ Cluster.Status.Phase is "Pending" \n- ✅ Cluster.Status.InfraStructureReady is true\n- ✅ ControlPlane instance is valid | ||
|
||
"ControlPlane Controller"->"API Server": Get Machines maching label selector | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
opt ControlPlane.Spec.Replicas >= 1, 1 or more existing Machines found that is "Ready" | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":Set ControlPlane.Status.Initialized = true | ||
"ControlPlane Controller"-> "ControlPlane Controller":Set ControlPlane.Status.Phase = "Initialized" | ||
|
||
opt num Machines matches Replicas, and all Machines "Ready" | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":Set ControlPlane.Status.Ready = true | ||
"ControlPlane Controller"-> "ControlPlane Controller":Set ControlPlane.Status.Phase = "Ready" | ||
|
||
end | ||
|
||
end | ||
|
||
"ControlPlane Controller"->"API Server": Patch ControlPlane | ||
"ControlPlane 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.
41 changes: 41 additions & 0 deletions
41
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,41 @@ | ||
@startuml | ||
title User creates a Cluster with ControlPlane | ||
|
||
' -- 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": ControlPlane 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 | ||
"Cluster API Cluster Controller"-> "Cluster API Cluster Controller":Set Cluster.Status.Phase = "Initialized" | ||
|
||
opt Cluster.Spec.ControlPlaneRef -> Status.Ready is true | ||
|
||
"Cluster API Cluster Controller"-> "Cluster API Cluster Controller":Set Cluster.Status.ControlPlaneReady = true | ||
"Cluster API Cluster Controller"-> "Cluster API Cluster Controller":Set Cluster.Status.Phase = "Ready" | ||
|
||
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.
54 changes: 54 additions & 0 deletions
54
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,54 @@ | ||
@startuml | ||
title User scales up a ControlPlane | ||
actor User | ||
|
||
' -- GROUPS START --- | ||
|
||
box #lightgreen | ||
participant "API Server" | ||
end box | ||
|
||
box #violet | ||
participant "ControlPlane Controller" | ||
end box | ||
|
||
' -- GROUPS END --- | ||
|
||
User->"API Server":kubectl scale cp/my-control-plane -replicas=3 | ||
"API Server"-->>"ControlPlane Controller": ControlPlane Updated | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":Enqueues ControlPlane Reconcile | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":ControlPlane Controller Reconcile | ||
activate "ControlPlane Controller" | ||
|
||
note over "ControlPlane Controller": - ✅ ControlPlane.OwnerReferences \ncontains a Cluster | ||
|
||
"ControlPlane Controller"->"API Server": Get Cluster | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
note over "ControlPlane Controller": - ✅ Cluster.Status.InfraStructureReady is true\n- ✅ ControlPlane instance is valid | ||
|
||
"ControlPlane Controller"->"API Server": Get Machines maching label selector | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
opt ControlPlane.Spec.Replicas >= 1, all existing Machines "Ready", num Machines < Replicas | ||
|
||
"ControlPlane Controller"->"API Server": Create KubeadmConfig from ControlPlane.Spec.KubeadmConfigSpec | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
"ControlPlane Controller"->"API Server": Create InfrastructureMachine from ControlPlane.Spec.InfrastructureTemplate | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
"ControlPlane Controller"->"API Server": Create Machine using refs from created KubeadmConfig and InfrastructureMachine resources | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":Set ControlPlane.Status.Phase = "ScalingUp" | ||
|
||
end | ||
|
||
"ControlPlane Controller"->"API Server": Update ControlPlane | ||
"ControlPlane 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.
57 changes: 57 additions & 0 deletions
57
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,57 @@ | ||
@startuml | ||
title User scales down a ControlPlane | ||
actor User | ||
|
||
' -- GROUPS START --- | ||
|
||
box #lightgreen | ||
participant "API Server" | ||
end box | ||
|
||
box #violet | ||
participant "ControlPlane 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"-->>"ControlPlane Controller": ControlPlane Updated | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":Enqueues ControlPlane Reconcile | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":ControlPlane Controller Reconcile | ||
activate "ControlPlane Controller" | ||
|
||
note over "ControlPlane Controller": - ✅ ControlPlane.OwnerReferences \ncontains a Cluster | ||
|
||
"ControlPlane Controller"->"API Server": Get Cluster | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
note over "ControlPlane Controller": - ✅ Cluster.Status.InfraStructureReady is true\n- ✅ ControlPlane instance is valid | ||
|
||
"ControlPlane Controller"->"API Server": Get Machines maching label selector | ||
"ControlPlane Controller"<<--"API Server": Response | ||
|
||
note over "ControlPlane Controller": - Process for selecting a Machine to delete is TBD | ||
|
||
opt ControlPlane.Spec.Replicas >= 1, all existing Machines "Ready", num Machines > Replicas | ||
|
||
"ControlPlane Controller"->"API Server": Delete a Machine | ||
|
||
"ControlPlane Controller"->"Workload Cluster API Server": Remove etcd Member | ||
|
||
"ControlPlane Controller"->"Workload Cluster API Server": Modify kubeadm ConfigMap | ||
|
||
"ControlPlane Controller"-> "ControlPlane Controller":Set ControlPlane.Status.Phase = "ScalingDown" | ||
|
||
end | ||
|
||
"ControlPlane Controller"->"API Server": Update ControlPlane | ||
"ControlPlane 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.