mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-22 01:17:16 +00: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>
27 lines
760 B
Lua
27 lines
760 B
Lua
local hs = {}
|
|
if obj.status ~= nil then
|
|
if obj.status.conditions ~= nil then
|
|
local installed = false
|
|
local healthy = false
|
|
for i, condition in ipairs(obj.status.conditions) do
|
|
if condition.type == "Installed" then
|
|
installed = condition.status == "True"
|
|
installed_message = condition.reason
|
|
elseif condition.type == "Healthy" then
|
|
healthy = condition.status == "True"
|
|
healthy_message = condition.reason
|
|
end
|
|
end
|
|
if installed and healthy then
|
|
hs.status = "Healthy"
|
|
else
|
|
hs.status = "Degraded"
|
|
end
|
|
hs.message = installed_message .. " " .. healthy_message
|
|
return hs
|
|
end
|
|
end
|
|
|
|
hs.status = "Progressing"
|
|
hs.message = "Waiting for provider to be installed"
|
|
return hs
|