github.com/argoproj/argo-cd/v2@v2.10.9/resource_customizations/cluster.x-k8s.io/MachineDeployment/health.lua (about)

     1  local hs = {}
     2  hs.status = "Progressing"
     3  hs.message = "Waiting for machines"
     4  
     5  if obj.spec.paused ~= nil and obj.spec.paused then
     6      hs.status = "Suspended"
     7      hs.message = "MachineDeployment is paused"
     8      return hs
     9  end
    10  
    11  if obj.status ~= nil and obj.status.phase ~= nil then
    12      if obj.status.phase == "Running" then
    13          hs.status = "Healthy"
    14          hs.message = "Machines are running under this deployment"
    15      end
    16      if obj.status.phase == "ScalingUp" then
    17          hs.status = "Progressing"
    18          hs.message = "Cluster is spawning machines"
    19      end
    20      if obj.status.phase == "ScalingDown" then
    21          hs.status = "Progressing"
    22          hs.message = "Cluster is stopping machines"
    23      end
    24      if obj.status.phase == "Failed" then
    25          hs.status = "Degraded"
    26          hs.message = "MachineDeployment is failed"
    27      end
    28  end
    29  
    30  return hs