github.com/argoproj/argo-cd/v2@v2.10.9/resource_customizations/argoproj.io/ApplicationSet/health.lua (about)

     1  local hs = {}
     2  
     3  if obj.status ~= nil then
     4    if obj.status.conditions ~= nil then
     5      for i, condition in pairs(obj.status.conditions) do
     6        if condition.type == "ErrorOccurred" and condition.status == "True" then
     7          hs.status = "Degraded"
     8          hs.message = condition.message
     9          return hs
    10        end
    11        if condition.type == "ResourcesUpToDate" and condition.status == "True" then
    12          hs.status = "Healthy"
    13          hs.message = condition.message
    14          return hs
    15        end
    16      end
    17    end
    18  end
    19  
    20  -- Conditions were introduced in ApplicationSet v0.3. To give v0.2 users a good experience, we default to "Healthy".
    21  -- Once v0.3 is more generally adopted, we'll default to "Progressing" instead.
    22  hs.status = "Healthy"
    23  hs.message = ""
    24  return hs