github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/policy.open-cluster-management.io/OperatorPolicy/health.lua (about) 1 hs = {} 2 if obj.status == nil or obj.status.conditions == nil then 3 hs.status = "Progressing" 4 hs.message = "Waiting for the status to be reported" 5 return hs 6 end 7 if obj.status.observedGeneration ~= nil and obj.status.observedGeneration ~= obj.metadata.generation then 8 hs.status = "Progressing" 9 hs.message = "Waiting for the status to be updated" 10 return hs 11 end 12 for i, condition in ipairs(obj.status.conditions) do 13 if condition.type == "Compliant" then 14 hs.message = condition.message 15 if condition.status == "True" then 16 hs.status = "Healthy" 17 return hs 18 else 19 hs.status = "Degraded" 20 return hs 21 end 22 end 23 end 24 hs.status = "Progressing" 25 hs.message = "Waiting for the compliance condition" 26 return hs