github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/numaflow.numaproj.io/Pipeline/health.lua (about) 1 local hs = {} 2 local healthy = {} 3 4 if obj.status ~= nil then 5 if obj.status.conditions ~= nil then 6 for i, condition in ipairs(obj.status.conditions) do 7 if condition.status == "False" then 8 healthy.status = "False" 9 end 10 end 11 end 12 13 if obj.metadata.generation == obj.status.observedGeneration then 14 if (healthy ~= {} and healthy.status == "False") or obj.status.phase == "Failed" then 15 hs.status = "Degraded" 16 if obj.status.phase == "Failed" then 17 hs.message = obj.status.message 18 else 19 hs.message = "Subresources are unhealthy" 20 end 21 return hs 22 elseif obj.status.phase == "Paused" or obj.status.phase == "Pausing" then 23 hs.status = "Healthy" 24 hs.message = "Pipeline is paused" 25 return hs 26 elseif obj.status.phase == "Running" then 27 hs.status = "Healthy" 28 hs.message = "Pipeline is healthy" 29 return hs 30 end 31 end 32 end 33 34 hs.status = "Progressing" 35 hs.message = "Waiting for Pipeline status" 36 return hs