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

     1  local hs = {}
     2  if obj.status ~= nil then
     3    if obj.status.conditions ~= nil then
     4  
     5      -- Always Handle Issuing First to ensure consistent behaviour
     6      for i, condition in ipairs(obj.status.conditions) do
     7        if condition.type == "Issuing" and condition.status == "True" then
     8          hs.status = "Progressing"
     9          hs.message = condition.message
    10          return hs
    11        end
    12      end
    13  
    14      for i, condition in ipairs(obj.status.conditions) do
    15        if condition.type == "Ready" and condition.status == "False" then
    16          hs.status = "Degraded"
    17          hs.message = condition.message
    18          return hs
    19        end
    20        if condition.type == "Ready" and condition.status == "True" then
    21          hs.status = "Healthy"
    22          hs.message = condition.message
    23          return hs
    24        end
    25      end
    26    end
    27  end
    28  
    29  hs.status = "Progressing"
    30  hs.message = "Waiting for certificate"
    31  return hs