github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/addons.cluster.x-k8s.io/ClusterResourceSet/health.lua (about) 1 function getStatus(obj) 2 local hs = {} 3 hs.status = "Progressing" 4 hs.message = "Initializing cluster resource set" 5 6 if obj.status ~= nil then 7 if obj.status.conditions ~= nil then 8 for i, condition in ipairs(obj.status.conditions) do 9 10 -- Ready 11 if condition.type == "ResourcesApplied" and condition.status == "True" then 12 hs.status = "Healthy" 13 hs.message = "cluster resource set is applied" 14 return hs 15 end 16 17 -- Resources Applied 18 if condition.type == "ResourcesApplied" and condition.status == "False" then 19 hs.status = "Degraded" 20 hs.message = condition.message 21 return hs 22 end 23 24 end 25 end 26 end 27 return hs 28 end 29 30 local hs = getStatus(obj) 31 return hs