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

     1  local hs = {}
     2  
     3  if obj.status ~= nil then
     4    if obj.status.developerUserState ~= nil and obj.status.developerUserState == "suspended" then
     5      hs.status = "Suspended"
     6      hs.message = "3scale Developer user is waiting for admin approval"
     7      return hs
     8    end
     9  
    10    if obj.status.conditions ~= nil then
    11      for _, condition in ipairs(obj.status.conditions) do
    12        if condition.status ~= "True" then goto continue end
    13  
    14        if condition.type == "Ready" then
    15          hs.status = "Healthy"
    16          hs.message = "3scale DeveloperUser is ready"
    17          return hs
    18        elseif condition.type == "Invalid" then
    19          hs.status = "Degraded"
    20          hs.message = condition.message or "3scale DeveloperUser configuration is invalid"
    21          return hs
    22        elseif condition.type == "Orphan" then
    23          hs.status = "Degraded"
    24          hs.message = condition.message or "3scale DeveloperUser references non-existing resources"
    25          return hs
    26        elseif condition.type == "Failed" then
    27          hs.status = "Degraded"
    28          hs.message = condition.message or "3scale DeveloperUser synchronization failed"
    29          return hs
    30        end
    31  
    32        ::continue::
    33      end
    34    end
    35  end
    36  
    37  hs.status = "Progressing"
    38  hs.message = "Waiting for 3scale DeveloperUser status..."
    39  return hs