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

     1  local hs = { status="Progressing", message="No status available"}
     2  if obj.status ~= nil then
     3    if obj.status.conditions ~= nil then
     4      for i, condition in ipairs(obj.status.conditions) do
     5        if condition.type == "Paused" and condition.status == "True" then
     6          hs.status = "Suspended"
     7          hs.message = "Paused"
     8          return hs
     9        end
    10        if condition.type == "Ready" then
    11          if condition.status == "True" then
    12            hs.status="Healthy"
    13            hs.message="Running"
    14          else
    15            if obj.status.created then
    16              hs.message = "Starting"
    17            else
    18              hs.status = "Suspended"
    19              hs.message = "Stopped"
    20            end
    21          end
    22        end
    23      end
    24    end
    25    if obj.status.printableStatus ~= nil then
    26      hs.message = obj.status.printableStatus
    27    end
    28  end
    29  return hs