github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/capabilities.3scale.net/OpenAPI/health.lua (about)

     1  local hs = {}
     2  
     3  if obj.status ~= nil and obj.status.conditions ~= nil then
     4    for _, condition in ipairs(obj.status.conditions) do
     5      if condition.status ~= "True" then goto continue end
     6  
     7      if condition.type == "Ready" then
     8        hs.status = "Healthy"
     9        hs.message = "3scale OpenAPI is ready"
    10        return hs
    11      elseif condition.type == "Invalid" then
    12        hs.status = "Degraded"
    13        hs.message = condition.message or "3scale OpenAPI configuration is invalid"
    14        return hs
    15      elseif condition.type == "Failed" then
    16        hs.status = "Degraded"
    17        hs.message = condition.message or "3scale OpenAPI reconciliation failed"
    18        return hs
    19      end
    20  
    21      ::continue::
    22    end
    23  end
    24  
    25  hs.status = "Progressing"
    26  hs.message = "Waiting for 3scale OpenAPI status..."
    27  return hs