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

     1  -- healthcheck for IngressController resources
     2  local hs = {}
     3  if obj.status ~= nil then
     4    if obj.status.conditions ~= nil then
     5        -- if the status conditions are present, iterate over them and check their status
     6      for _, condition in pairs(obj.status.conditions) do
     7        if condition.type == "Degraded" and condition.status == "True" then
     8          hs.status = "Degraded"
     9          hs.message = condition.message
    10          return hs
    11        elseif condition.type == "DeploymentReplicasAllAvailable" and condition.status == "False" then
    12          hs.status = "Progressing"
    13          hs.message =  condition.message
    14          return hs
    15        elseif condition.type == "Progressing" and condition.status == "True" then
    16          hs.status = "Progressing"
    17          hs.message =  condition.reason
    18          return hs
    19        elseif condition.type == "Available" and condition.status == "True" then
    20          hs.status = "Healthy"
    21          hs.message = "IngressController is available"
    22          return hs
    23        end
    24      end
    25    end
    26  end
    27  
    28  -- default status when none of the previous condition matches
    29  hs.status = "Progressing"
    30  hs.message = "Status of IngressController is not known yet"
    31  return hs