mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
* feat(health): add `PushSecret` health status Signed-off-by: Alexandre Gaudreault <[email protected]> * add status healthy Signed-off-by: Alexandre Gaudreault <[email protected]> * Push action Signed-off-by: Alexandre Gaudreault <[email protected]> * fix test Signed-off-by: Alexandre Gaudreault <[email protected]> --------- Signed-off-by: Alexandre Gaudreault <[email protected]>
21 lines
560 B
Lua
21 lines
560 B
Lua
hs = {}
|
|
if obj.status ~= nil then
|
|
if obj.status.conditions ~= nil then
|
|
for i, condition in ipairs(obj.status.conditions) do
|
|
if condition.type == "Ready" and condition.status == "False" then
|
|
hs.status = "Degraded"
|
|
hs.message = condition.message
|
|
return hs
|
|
end
|
|
if condition.type == "Ready" and condition.status == "True" then
|
|
hs.status = "Healthy"
|
|
hs.message = condition.message
|
|
return hs
|
|
end
|
|
end
|
|
end
|
|
end
|
|
hs.status = "Progressing"
|
|
hs.message = "Waiting for PushSecret"
|
|
return hs
|