github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/camel.apache.org/Integration/health.lua (about)

     1  local hs = {}
     2  if obj.status ~= nil then
     3    if obj.status.conditions ~= nil then
     4      for i, condition in ipairs(obj.status.conditions) do
     5        --  Let's check if something is wrong with the CRD deployment
     6        if condition.type == "Ready" and condition.status == "False" then
     7          hs.status = "Degraded"
     8          hs.message = condition.message
     9          return hs
    10        end
    11        --  Let's check if things are healthy with the CRD deployment
    12        if condition.type == "Ready" and condition.status == "True" then
    13          hs.status = "Healthy"
    14          hs.message = condition.message
    15          return hs
    16        end
    17      end
    18    end
    19  end
    20  
    21  -- Otherwise let's assume that we are still busy building/deploying the Integration
    22  hs.status = "Progressing"
    23  hs.message = "Waiting for Integration"
    24  return hs