github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/capabilities.3scale.net/ProxyConfigPromote/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 ProxyConfigPromote is ready"
    10        return hs
    11      elseif condition.type == "In-progress" then
    12        hs.status = "Progressing"
    13        hs.message = condition.message or "3scale ProxyConfigPromote is in progress"
    14        return hs
    15      elseif condition.type == "Failed" then
    16        hs.status = "Degraded"
    17        hs.message = condition.message or "3cale ProxyConfigPromote failed"
    18        return hs
    19      end
    20  
    21      ::continue::
    22    end
    23  end
    24  
    25  hs.status = "Progressing"
    26  hs.message = "Waiting for 3scale ProxyConfigPromote status..."
    27  return hs