-
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 #9664 from Jont828/mpm-proposal-update
📖 Update MachinePool Machines proposal with diagrams
- Loading branch information
Showing
11 changed files
with
185 additions
and
51 deletions.
There are no files selected for viewing
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
27 changes: 27 additions & 0 deletions
27
docs/proposals/images/machinepool-machines/inframachinepool-scale-down.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,27 @@ | ||
@startuml inframachinepool-scale-down | ||
repeat :begin reconciling InfraMachinePool; | ||
:fetch all InfraMachinePoolMachines; | ||
:fetch owner Machine for each InfraMachinePoolMachine; | ||
backward:wait for owner Machine to be created; | ||
repeat while (any owner Machine is missing) is (yes) | ||
-> no; | ||
while (for each Machine) | ||
if (replica backing Machine does not exist?) then (yes) | ||
:delete Machine; | ||
else (no) | ||
endif | ||
endwhile | ||
->no; | ||
while (~# ready replicas > # desired replicas?) is (yes) | ||
if (a Machine has clusterv1.DeleteMachineAnnotation) then (yes) | ||
:select this Machine for deletion; | ||
else (no) | ||
:select any Machine using any ordering, | ||
i.e. failed first, oldest first; | ||
endif | ||
:delete selected Machine; | ||
endwhile | ||
->no; | ||
:end reconciling InfraMachinePool; | ||
stop | ||
@enduml |
Binary file added
BIN
+37.9 KB
docs/proposals/images/machinepool-machines/inframachinepool-scale-down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions
15
docs/proposals/images/machinepool-machines/inframachinepool-scale-up.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,15 @@ | ||
@startuml inframachinepool-scale-up | ||
:begin reconciling InfraMachinePool; | ||
if (status.InfrastructureMachineKind is set on InfraMachinePool) then (no) | ||
:set status.InfrastructureMachineKind to InfraMachinePoolMachine; | ||
else (yes) | ||
endif | ||
while (~# up to date replicas < # desired replicas ?) is (yes) | ||
:create provider specific resource representing a replica; | ||
endwhile (no) | ||
while (every replica has an InfraMachinePoolMachine?) is (no) | ||
:create InfraMachinePoolMachine representing a replica; | ||
endwhile (yes) | ||
:end reconciling InfraMachinePool; | ||
stop | ||
@enduml |
Binary file added
BIN
+23.3 KB
docs/proposals/images/machinepool-machines/inframachinepool-scale-up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 0 additions & 17 deletions
17
docs/proposals/images/machinepool-machines/infraref-changed-sequence.plantuml
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-32.3 KB
docs/proposals/images/machinepool-machines/infraref-changed-sequence.png
Binary file not shown.
13 changes: 13 additions & 0 deletions
13
docs/proposals/images/machinepool-machines/machinepool-machine-reconcile.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,13 @@ | ||
@startuml machinepool-machine-reconcile | ||
:begin reconciling Machine; | ||
if (is deleting?) then (no) | ||
:ensure InfraMachinePoolMachine has ownerRef to Machine; | ||
else (yes) | ||
:cordon and drain node; | ||
:delete InfraMachinePoolMachine; | ||
:wait for InfraMachinePoolMachine to be deleted; | ||
:delete node; | ||
endif | ||
:continue reconciling Machine; | ||
stop | ||
@enduml |
Binary file added
BIN
+18.2 KB
docs/proposals/images/machinepool-machines/machinepool-machine-reconcile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
docs/proposals/images/machinepool-machines/machinepool-reconcile.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,19 @@ | ||
@startuml machinepool-reconcile | ||
:begin reconciling MachinePool; | ||
if (status.InfrastructureMachineKind is set on InfraMachinePool) then (no) | ||
:reconcile MachinePool replicas without MachinePool Machines; | ||
else (yes) | ||
:find the InfraMachinePoolMachines matching the kind | ||
with the matching MachinePool name and Cluster name label; | ||
while (for each InfraMachinePoolMachines) | ||
if (a owner Machine exists for a InfraMachinePoolMachine) then (no) | ||
:create a Machine with infraRef pointing | ||
to the InfraMachinePoolMachine; | ||
else (yes) | ||
endif | ||
:ensure Machine has an ownerRef to the MachinePool; | ||
endwhile | ||
endif | ||
:continue reconciling MachinePool...; | ||
stop | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.