github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/beat.k8s.elastic.co/Beat/health.lua (about)

     1  local hs = {}
     2  
     3  if obj.status ~= nil and (obj.status.health ~= nil or obj.status.expectedNodes ~= nil) then
     4    if obj.status.health == "red" then
     5      hs.status = "Degraded"
     6      hs.message = "Elastic Beat status is Red"
     7      return hs
     8    elseif obj.status.health == "green" then
     9      hs.status = "Healthy"
    10      hs.message = "Elastic Beat status is Green"
    11      return hs
    12    elseif obj.status.health == "yellow" then
    13      if obj.status.availableNodes ~= nil and obj.status.expectedNodes ~= nil then
    14          hs.status = "Progressing"
    15          hs.message = "Elastic Beat status is deploying, there is " .. obj.status.availableNodes .. " instance(s) on " .. obj.status.expectedNodes .. " expected"
    16          return hs
    17      else
    18          hs.status = "Progressing"
    19          hs.message = "Elastic Beat phase is progressing"
    20          return hs
    21      end
    22    elseif obj.status.health == nil then
    23      hs.status = "Progressing"
    24      hs.message = "Elastic Beat phase is progressing"
    25      return hs
    26    end
    27  end
    28  
    29  hs.status = "Unknown"
    30  hs.message = "Elastic Beat status is unknown. Ensure your ArgoCD is current and then check for/file a bug report: https://github.com/argoproj/argo-cd/issues"
    31  return hs