github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/psmdb.percona.com/PerconaServerMongoDB/health.lua (about) 1 local hs = {} 2 if obj.status ~= nil then 3 local state_map = { 4 initializing = "Progressing", 5 ready = "Healthy", 6 error = "Degraded", 7 stopping = "Progressing", 8 paused = "Suspended" 9 } 10 11 hs.status = state_map[obj.status.state] or "Unknown" 12 hs.message = obj.status.ready .. "/" .. obj.status.size .. " node(s) are ready" 13 return hs 14 end 15 16 hs.status = "Unknown" 17 hs.message = "Cluster status is unknown" 18 return hs