github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/projectcontour.io/ExtensionService/health.lua (about)

     1  -- Status reporting information detailed here
     2  -- ExtensionService status conditions api information here: https://projectcontour.io/docs/v1.18.0/config/api/#projectcontour.io/v1alpha1.ExtensionServiceStatus
     3  
     4  hs = {
     5    status = "Progressing",
     6    message = "Waiting for status",
     7  }
     8  
     9  if obj.status then
    10    if obj.status.conditions then
    11      for _, cond in ipairs(obj.status.conditions) do
    12        if obj.metadata.generation == cond.observedGeneration then -- This must match so that we don't report a resource as healthy even though its status is stale
    13          if cond.type == "Valid" and cond.status == "True" then -- Contour will update a single condition, Valid, that is in normal-true polarity.
    14            hs.status = "Healthy"
    15            hs.message = cond.message
    16            return hs
    17          elseif cond.type == "Valid" and cond.status == "False" then
    18            hs.status = "Degraded"
    19            hs.message = cond.message
    20            return hs
    21          end
    22        end
    23      end
    24    end
    25  end
    26  
    27  return hs