argo-cd/resource_customizations/astra.netapp.io/ExecHook/health.lua
2024-05-01 19:22:23 +03:00

13 lines
373 B
Lua

hs = { status = "Progressing", message = "No status available" }
if obj.spec ~= nil then
if obj.spec.enabled ~= nil then
if obj.spec.enabled == true then
hs.status = "Healthy"
hs.message = obj.kind .. " enabled"
elseif obj.spec.enabled == false then
hs.status = "Suspended"
hs.message = obj.kind .. " disabled"
end
end
end
return hs