github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/k8s.mariadb.com/Backup/health.lua (about)

     1  local health_status = {}
     2  
     3  if obj.status ~= nil and obj.status.conditions ~= nil then
     4  
     5      for i, condition in ipairs(obj.status.conditions) do
     6  
     7          health_status.message = condition.reason .. " " .. condition.message
     8  
     9          if condition.status == "False" then
    10              if condition.reason == "CronJobScheduled" and condition.message == "Failed" then
    11                  health_status.status = "Degraded"
    12                  return health_status
    13              end
    14              health_status.status = "Progressing"
    15              return health_status
    16          end
    17      end
    18  
    19      health_status.status = "Healthy"
    20      return health_status
    21  end
    22  
    23  health_status.status = "Progressing"
    24  health_status.message = "No status info available"
    25  return health_status