mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
Signed-off-by: Mahesh <[email protected]> Co-authored-by: Ishita Sequeira <[email protected]>
32 lines
1.0 KiB
Lua
32 lines
1.0 KiB
Lua
hs={ status = "Progressing", message = "Rollout is still progressing" }
|
|
|
|
if obj.metadata.generation == obj.status.observedGeneration then
|
|
|
|
if obj.status.canaryStatus.currentStepState == "StepUpgrade" and obj.status.phase == "Progressing" then
|
|
hs.status = "Progressing"
|
|
hs.message = "Rollout is still progressing"
|
|
return hs
|
|
end
|
|
|
|
if obj.status.canaryStatus.currentStepState == "StepPaused" and obj.status.phase == "Progressing" then
|
|
hs.status = "Suspended"
|
|
hs.message = "Rollout is Paused need manual intervention"
|
|
return hs
|
|
end
|
|
|
|
if obj.status.canaryStatus.currentStepState == "Completed" and obj.status.phase == "Healthy" then
|
|
hs.status = "Healthy"
|
|
hs.message = "Rollout is Completed"
|
|
return hs
|
|
end
|
|
|
|
if obj.status.canaryStatus.currentStepState == "StepPaused" and (obj.status.phase == "Terminating" or obj.status.phase == "Disabled") then
|
|
hs.status = "Degraded"
|
|
hs.message = "Rollout is Disabled or Terminating"
|
|
return hs
|
|
end
|
|
|
|
end
|
|
|
|
return hs
|