argo-cd/resource_customizations/grafana-org-operator.kubitus-project.gitlab.io/_/health.lua
Mathieu Parent ac1a2f8536
feat(health): add grafana-org-operator Health (#25662)
Signed-off-by: Mathieu Parent <math.parent@etik.com>
2025-12-15 16:38:24 +00:00

22 lines
536 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" then
hs.message = condition.message
if condition.status == "False" then
hs.status = "Degraded"
elseif condition.status == "True" then
hs.status = "Healthy"
else
hs.status = "Progressing"
end
return hs
end
end
end
end
hs.status = "Progressing"
hs.message = "Waiting ..."
return hs