mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
Signed-off-by: Daniel Leinov <[email protected]> Co-authored-by: Pasha Kostohrys <[email protected]>
22 lines
555 B
Lua
22 lines
555 B
Lua
hs = {}
|
|
|
|
hs.status = "Progressing"
|
|
hs.message = "Waiting for status to be updated"
|
|
|
|
if obj.status ~= nil and obj.status.conditions ~= nil then
|
|
for i, condition in ipairs(obj.status.conditions) do
|
|
if condition.type == "RemoteSynced" then
|
|
if condition.status == "True" then
|
|
hs.status = "Healthy"
|
|
hs.message = "Resource is ready"
|
|
return hs
|
|
elseif condition.status == "False" then
|
|
hs.status = "Degraded"
|
|
hs.message = condition.message
|
|
return hs
|
|
end
|
|
end
|
|
end
|
|
end
|
|
return hs
|