sigs.k8s.io/cluster-api@v1.7.1/docs/book/src/images/cluster-admission-machinedeployment-controller.plantuml (about)

     1  @startuml cluster-admission-machinedeployment-controller
     2  
     3  start;
     4  :MachineDeployment controller;
     5  
     6  repeat
     7    :MachineDeployment controller enqueues a Reconcile call;
     8    :List all MachineSets in namespace;
     9    repeat
    10      if (MachineSet matches MachineDeployment's selector) then (yes)
    11        if (MachineSet Owned by this MachineDeployment) then (yes)
    12          #LightBlue:Add to List;
    13        elseif (Not Owned By Any MachineDeployment) then (yes)
    14          :Adopt MachineSet;
    15          #LightBlue:Add to List;
    16        endif
    17      endif
    18    repeat while (More MachineSets) then (yes)
    19    if (Paused) then (yes)
    20     #LightBlue:Update status and exit;
    21    else 
    22      if (RollingUpdate Deployment Strategy) then (yes)
    23        :Select newest MachineSet;
    24        :Propagate in-place changes to newest MachineSet;
    25        if (Too Many replicas) then (yes)
    26          #LightBlue:Scale machineSet down;
    27        elseif (Not Enough Replicas)
    28          #LightBlue:Create new replicas;
    29        endif
    30        if (Old MachineSet Replicas are Unhealthy) then (yes)
    31          #LightBlue:Cleanup Unhealthy Replicas;
    32        elseif (New MachineSets Replicas available) then (yes)
    33          #LightBlue:Scale MachineSet down;
    34        endif
    35      elseif (OnDelete Deployment Strategy) then (yes)
    36        :Select newest MachineSet;
    37        :Propagate in-place changes to newest MachineSet;
    38        if (Too Many replicas) then (yes)
    39          #LightBlue:Scale machineSet down;
    40        elseif (Not Enough Replicas)
    41          #LightBlue:Create new replicas;
    42        endif
    43        repeat
    44        if (Old MachineSet Has Desired Replicas) then (yes)
    45          if (Old MachineSet Has Actual Replicas Deleting) then (yes)
    46            :Scale down DesiredReplicas to ActualReplicas - DeletingReplicas;
    47          endif
    48        endif
    49        repeat while (More Old MachineSets need Processing) then (yes)
    50        repeat
    51        if (MachineDeployment Desired Replicas < Desired Replicas of All MachineSets) then (yes)
    52          if (Old MachineSet Has Desired Replicas) then (yes)
    53            :Remove replica;
    54          endif
    55        endif
    56        repeat while (MachineDeployment Desired Replicas != Desired Replicas of All MachineSets) then (yes)
    57      else (no)
    58        #Pink:Unknown strategy;
    59      endif
    60    endif
    61  repeat while (More updates to MachineDeployments) then (yes)
    62  stop;
    63  
    64  @enduml