github.com/argoproj/argo-cd/v2@v2.10.9/resource_customizations/cdi.kubevirt.io/DataVolume/health.lua (about)

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