mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
* chore(action): add newlines at eof Signed-off-by: Josh Soref <[email protected]> * chore(action): fix whitespace indentation Signed-off-by: Josh Soref <[email protected]> * chore(action): use local annotations Signed-off-by: Josh Soref <[email protected]> --------- Signed-off-by: Josh Soref <[email protected]>
30 lines
845 B
Lua
30 lines
845 B
Lua
local hs = {}
|
|
hs.status = "Progressing"
|
|
hs.message = "Waiting for machines"
|
|
|
|
if obj.spec.paused ~= nil and obj.spec.paused then
|
|
hs.status = "Suspended"
|
|
hs.message = "MachineDeployment is paused"
|
|
return hs
|
|
end
|
|
|
|
if obj.status ~= nil and obj.status.phase ~= nil then
|
|
if obj.status.phase == "Running" then
|
|
hs.status = "Healthy"
|
|
hs.message = "Machines are running under this deployment"
|
|
end
|
|
if obj.status.phase == "ScalingUp" then
|
|
hs.status = "Progressing"
|
|
hs.message = "Cluster is spawning machines"
|
|
end
|
|
if obj.status.phase == "ScalingDown" then
|
|
hs.status = "Progressing"
|
|
hs.message = "Cluster is stopping machines"
|
|
end
|
|
if obj.status.phase == "Failed" then
|
|
hs.status = "Degraded"
|
|
hs.message = "MachineDeployment is failed"
|
|
end
|
|
end
|
|
|
|
return hs |