github.com/argoproj/argo-cd/v2@v2.10.9/resource_customizations/rollouts.kruise.io/Rollout/health.lua (about)

     1  hs={ status = "Progressing", message = "Rollout is still progressing" }
     2  
     3  if obj.metadata.generation == obj.status.observedGeneration then
     4  
     5      if obj.status.canaryStatus.currentStepState == "StepUpgrade" and obj.status.phase == "Progressing" then
     6          hs.status = "Progressing"
     7          hs.message = "Rollout is still progressing"
     8          return hs
     9      end
    10  
    11      if obj.status.canaryStatus.currentStepState == "StepPaused" and obj.status.phase == "Progressing" then
    12          hs.status = "Suspended"
    13          hs.message = "Rollout is Paused need manual intervention"
    14          return hs
    15      end
    16  
    17      if obj.status.canaryStatus.currentStepState == "Completed" and obj.status.phase == "Healthy" then
    18          hs.status = "Healthy"
    19          hs.message = "Rollout is Completed"
    20          return hs
    21      end
    22  
    23      if obj.status.canaryStatus.currentStepState == "StepPaused" and (obj.status.phase == "Terminating" or obj.status.phase == "Disabled") then
    24          hs.status = "Degraded"
    25          hs.message = "Rollout is Disabled or Terminating"
    26          return hs
    27      end
    28  
    29  end
    30  
    31  return hs