github.com/argoproj/argo-cd/v2@v2.10.9/resource_customizations/spot.io/SpotDeployment/health.lua (about) 1 local hs = {} 2 3 if obj.status == nil or obj.status.conditions == nil then 4 return hs 5 end 6 7 for _, condition in ipairs(obj.status.conditions) do 8 if condition.type == "InvalidSpec" then 9 hs.status = "Degraded" 10 hs.message = condition.message 11 return hs 12 end 13 if condition.type == "Progressing" and condition.reason == "RolloutAborted" then 14 hs.status = "Degraded" 15 hs.message = condition.message 16 return hs 17 end 18 if condition.type == "Progressing" and condition.reason == "ProgressDeadlineExceeded" then 19 hs.status = "Degraded" 20 hs.message = condition.message 21 return hs 22 end 23 if condition.type == "Paused" and condition.status == "True" then 24 hs.status = "Suspended" 25 hs.message = "Rollout is paused" 26 return hs 27 end 28 end 29 30 if obj.status.phase == "Progressing" then 31 hs.status = "Progressing" 32 hs.message = "Waiting for rollout to finish steps" 33 return hs 34 end 35 36 hs.status = "Healthy" 37 hs.message = "" 38 return hs 39 40 41