sigs.k8s.io/cluster-api@v1.7.1/docs/book/src/images/machine-infra-provider.plantuml (about)

     1  @startuml
     2  
     3  start
     4  
     5  :New/Updated/Deleted resource;
     6  
     7  if (Deleted?) then (yes)
     8      if (Has machine owner?) then (yes)
     9          :Reconcile deletion;
    10          if (Error?) then (yes)
    11              stop
    12          else (no)
    13              if (Control plane machine?) then (yes)
    14                  :Remove instance from control plane load balancer;
    15              else (no)
    16              endif
    17          endif
    18      else (no)
    19      endif
    20      :Delete provider-specific finalizer;
    21  else (no)
    22      if (Has machine owner?) then (yes)
    23          if (Has status.failureReason/failureMessage?) then (yes)
    24              stop
    25          else (no)
    26          endif
    27  
    28          if (Cluster exists?) then (no)
    29              stop
    30          else (yes)
    31          endif
    32  
    33          :Add provider-specific finalizer if needed;
    34  
    35          if (Cluster's status.infrastructureReady = true?) then (no)
    36              stop
    37          else (yes)
    38          endif
    39  
    40          if (Machine's spec.bootstrap.dataSecretName = nil?) then (yes)
    41              stop
    42          else (no)
    43          endif
    44  
    45          :Reconcile provider machine infrastructure;
    46          if (Error?) then (yes)
    47              :Set status.failureReason/failureMessage;
    48              :Patch resource to persist changes;
    49              stop
    50          else (no)
    51              if (Control plane machine?) then (yes)
    52                  :Register instance with control plane load balancer;
    53              else (no)
    54              endif
    55          endif
    56  
    57          :Set spec.providerID;
    58          :Set status.ready to true;
    59          :Set status.addresses;
    60      else (no)
    61      endif
    62  endif
    63  :Patch resource to persist changes;
    64  stop
    65  
    66  @enduml