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]>
23 lines
687 B
Lua
23 lines
687 B
Lua
local hs={ status = "Progressing", message = "Waiting for initialization" }
|
|
|
|
if obj.status ~= nil then
|
|
if obj.status.conditions ~= nil then
|
|
for i, condition in ipairs(obj.status.conditions) do
|
|
|
|
if condition.type == "Available" and condition.status ~= "True" then
|
|
if condition.reason == "SomePodsNotReady" then
|
|
hs.status = "Progressing"
|
|
else
|
|
hs.status = "Degraded"
|
|
end
|
|
hs.message = condition.message or condition.reason
|
|
end
|
|
if condition.type == "Available" and condition.status == "True" then
|
|
hs.status = "Healthy"
|
|
hs.message = "All instances are available"
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
return hs |