github.com/argoproj/argo-cd/v2@v2.10.9/resource_customizations/pxc.percona.com/PerconaXtraDBCluster/health.lua (about) 1 local hs = {} 2 if obj.status ~= nil then 3 4 if obj.status.state == "initializing" then 5 hs.status = "Progressing" 6 hs.message = obj.status.ready .. "/" .. obj.status.size .. " node(s) are ready" 7 return hs 8 end 9 10 if obj.status.state == "ready" then 11 hs.status = "Healthy" 12 hs.message = obj.status.ready .. "/" .. obj.status.size .. " node(s) are ready" 13 return hs 14 end 15 16 if obj.status.state == "paused" then 17 hs.status = "Unknown" 18 hs.message = "Cluster is paused" 19 return hs 20 end 21 22 if obj.status.state == "stopping" then 23 hs.status = "Degraded" 24 hs.message = "Cluster is stopping (" .. obj.status.ready .. "/" .. obj.status.size .. " node(s) are ready)" 25 return hs 26 end 27 28 if obj.status.state == "error" then 29 hs.status = "Degraded" 30 hs.message = "Cluster is on error: " .. table.concat(obj.status.message, ", ") 31 return hs 32 end 33 34 end 35 36 hs.status = "Unknown" 37 hs.message = "Cluster status is unknown. Ensure your ArgoCD is current and then check for/file a bug report: https://github.com/argoproj/argo-cd/issues" 38 return hs