Files
Justin KulikauskasandGitHub a790d128d6 feat: Add open-cluster-management.io healthchecks (#19411)
Healthchecks for several Policy types.

Signed-off-by: Justin Kulikauskas <[email protected]>
2024-08-13 15:38:30 -04:00

16 lines
428 B
Lua

hs = {}
if obj.status == nil or obj.status.compliant == nil then
hs.status = "Progressing"
hs.message = "Waiting for the status to be reported"
return hs
end
if obj.status.compliant == "Compliant" then
hs.status = "Healthy"
hs.message = "All certificates found comply with the policy"
return hs
else
hs.status = "Degraded"
hs.message = "At least once certificate does not comply with the policy"
return hs
end