github.com/argoproj/argo-cd/v2@v2.10.9/resource_customizations/apps.kruise.io/BroadcastJob/health.lua (about) 1 hs={ status= "Progressing", message= "BroadcastJob is still running" } 2 3 if obj.status ~= nil then 4 5 -- BroadcastJob are healthy if desired number and succeeded number is equal 6 if obj.status.desired == obj.status.succeeded and obj.status.phase == "completed" then 7 hs.status = "Healthy" 8 hs.message = "BroadcastJob is completed successfully" 9 return hs 10 end 11 -- BroadcastJob are progressing if active is not equal to 0 12 if obj.status.active ~= 0 and obj.status.phase == "running" then 13 hs.status = "Progressing" 14 hs.message = "BroadcastJob is still running" 15 return hs 16 end 17 -- BroadcastJob are progressing if failed is not equal to 0 18 if obj.status.failed ~= 0 and obj.status.phase == "failed" then 19 hs.status = "Degraded" 20 hs.message = "BroadcastJob failed" 21 return hs 22 end 23 24 if obj.status.phase == "paused" and obj.spec.paused == true then 25 hs.status = "Suspended" 26 hs.message = "BroadcastJob is Paused" 27 return hs 28 end 29 30 end 31 32 return hs