github.com/argoproj/argo-cd/v2@v2.10.9/resource_customizations/minio.min.io/Tenant/health.lua (about)

     1  local health_status = {}
     2  if obj.status ~= nil then
     3      if obj.status.currentState ~= nil then
     4          if obj.status.currentState == "Initialized" then
     5              health_status.status = "Healthy"
     6              health_status.message = obj.status.currentState
     7              return health_status
     8          end
     9          if obj.status.currentState:find("^Provisioning") ~= nil then
    10              health_status.status = "Progressing"
    11              health_status.message = obj.status.currentState
    12              return health_status
    13          end
    14          if obj.status.currentState:find("^Waiting") ~= nil then
    15              health_status.status = "Progressing"
    16              health_status.message = obj.status.currentState
    17              return health_status
    18          end
    19          if obj.status.currentState:find("^Updating") ~= nil then
    20              health_status.status = "Progressing"
    21              health_status.message = obj.status.currentState
    22              return health_status
    23          end
    24          if obj.status.currentState == "Restarting MinIO" then
    25              health_status.status = "Progressing"
    26              health_status.message = obj.status.currentState
    27              return health_status
    28          end
    29          if obj.status.currentState == "Statefulset not controlled by operator" then
    30              health_status.status = "Degraded"
    31              health_status.message = obj.status.currentState
    32              return health_status
    33          end
    34          if obj.status.currentState == "Another MinIO Tenant already exists in the namespace" then
    35              health_status.status = "Degraded"
    36              health_status.message = obj.status.currentState
    37              return health_status
    38          end
    39          if obj.status.currentState == "Tenant credentials are not set properly" then
    40              health_status.status = "Degraded"
    41              health_status.message = obj.status.currentState
    42              return health_status
    43          end
    44          if obj.status.currentState == "Different versions across MinIO Pools" then
    45              health_status.status = "Degraded"
    46              health_status.message = obj.status.currentState
    47              return health_status
    48          end
    49          if obj.status.currentState == "Pool Decommissioning Not Allowed" then
    50              health_status.status = "Degraded"
    51              health_status.message = obj.status.currentState
    52              return health_status
    53          end
    54          health_status.status = "Progressing"
    55          health_status.message = obj.status.currentState
    56          return health_status
    57      end
    58  end
    59  health_status.status = "Progressing"
    60  health_status.message = "No status info available"
    61  return health_status