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

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