github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/capabilities.3scale.net/DeveloperAccount/health.lua (about) 1 local hs = {} 2 3 if obj.status ~= nil and obj.status.conditions ~= nil then 4 for _, condition in ipairs(obj.status.conditions) do 5 if condition.status ~= "True" then goto continue end 6 7 if condition.type == "Ready" then 8 hs.status = "Healthy" 9 hs.message = "3scale DeveloperAccount is ready" 10 return hs 11 elseif condition.type == "Invalid" then 12 hs.status = "Degraded" 13 hs.message = condition.message or "3scale DeveloperAccount configuration is invalid" 14 return hs 15 elseif condition.type == "Failed" then 16 hs.status = "Degraded" 17 hs.message = condition.message or "3scale DeveloperAccount synchronization failed" 18 return hs 19 elseif condition.type == "Waiting" then 20 hs.status = "Suspended" 21 hs.message = condition.message or "3scale DeveloperAccount is waiting for approval" 22 return hs 23 end 24 25 ::continue:: 26 end 27 end 28 29 hs.status = "Progressing" 30 hs.message = "Waiting for 3scale DeveloperAccount status..." 31 return hs