github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/kyverno.io/Policy/health.lua (about)

     1  local hs = {}
     2  
     3  if obj.status ~= nil and obj.status.conditions ~= nil then
     4    for _, condition in ipairs(obj.status.conditions) do
     5      if condition.type == "Ready" and condition.status == "True" and condition.reason == "Succeeded" and condition.message == "Ready" then
     6        hs.status = "Healthy"
     7        hs.message = "Policy is ready"
     8        return hs
     9      end
    10    end
    11  end
    12  
    13  hs.status = "Progressing"
    14  hs.message = "Waiting for Policy to be ready"
    15  return hs