github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/coralogix.com/RecordingRuleGroupSet/health.lua (about)

     1  hs = {}
     2  
     3  hs.status = "Progressing"
     4  hs.message = "Waiting for status to be updated"
     5  
     6  if obj.status ~= nil and obj.status.conditions ~= nil then
     7      for i, condition in ipairs(obj.status.conditions) do
     8      if condition.type == "RemoteSynced" then
     9          if condition.status == "True" then
    10          hs.status = "Healthy"
    11          hs.message = "Resource is ready"
    12          return hs
    13          elseif condition.status == "False" then
    14          hs.status = "Degraded"
    15          hs.message = condition.message
    16          return hs
    17          end
    18      end
    19      end
    20  end
    21  return hs