github.com/argoproj/argo-cd@v1.8.7/resource_customizations/pkg.crossplane.io/Provider/health.lua (about)

     1  hs = {}
     2  if obj.status ~= nil then
     3    if obj.status.conditions ~= nil then
     4      installed = false
     5      healthy = false
     6      for i, condition in ipairs(obj.status.conditions) do
     7        if condition.type == "Installed" then
     8          installed = condition.status == "True"
     9          installed_message = condition.reason
    10        elseif condition.type == "Healthy" then
    11          healthy = condition.status == "True"
    12          healthy_message = condition.reason
    13        end
    14      end
    15      if installed and healthy then
    16        hs.status = "Healthy"
    17      else
    18        hs.status = "Degraded"
    19      end
    20      hs.message = installed_message .. " " .. healthy_message
    21      return hs
    22    end
    23  end
    24  
    25  hs.status = "Progressing"
    26  hs.message = "Waiting for provider to be installed"
    27  return hs