github.com/argoproj/argo-cd/v2@v2.10.9/resource_customizations/monitoring.coreos.com/Prometheus/health.lua (about)

     1  local hs={ status = "Progressing", message = "Waiting for initialization" }
     2  
     3  if obj.status ~= nil then
     4    if obj.status.conditions ~= nil then
     5      for i, condition in ipairs(obj.status.conditions) do
     6  
     7        if condition.type == "Available" and condition.status ~= "True" then
     8          if condition.reason == "SomePodsNotReady" then
     9            hs.status = "Progressing"
    10          else
    11            hs.status = "Degraded"
    12          end
    13          hs.message = condition.message or condition.reason
    14        end
    15        if condition.type == "Available" and condition.status == "True" then
    16          hs.status = "Healthy"
    17          hs.message = "All instances are available"
    18        end
    19      end
    20    end
    21  end
    22  
    23  return hs