mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
* chore(action): add newlines at eof Signed-off-by: Josh Soref <jsoref@gmail.com> * chore(action): fix whitespace indentation Signed-off-by: Josh Soref <jsoref@gmail.com> * chore(action): use local annotations Signed-off-by: Josh Soref <jsoref@gmail.com> --------- Signed-off-by: Josh Soref <jsoref@gmail.com>
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 |