This commit is contained in:
Simen Røstvik 2022-12-05 14:40:48 +01:00
parent a3e6f1db3a
commit 47a18bf267

View File

@ -18,31 +18,30 @@ argo-cd:
url: https://argoproj.github.io/argo-helm url: https://argoproj.github.io/argo-helm
configs: configs:
cm: cm:
resource.customizations.health: resource.customizations.health.networking.k8s.io_Ingress: |
networking.k8s.io_Ingress: | hs = {}
hs = {} hs.status = "Healthy"
hs.status = "Healthy" return hs
return hs
cert-manager.io_Certificate: | resource.customizations.health.cert-manager.io_Certificate: |
hs = {} hs = {}
if obj.status ~= nil then if obj.status ~= nil then
if obj.status.conditions ~= nil then if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do for i, condition in ipairs(obj.status.conditions) do
if condition.type == "Ready" and condition.status == "False" then if condition.type == "Ready" and condition.status == "False" then
hs.status = "Degraded" hs.status = "Degraded"
hs.message = condition.message hs.message = condition.message
return hs return hs
end end
if condition.type == "Ready" and condition.status == "True" then if condition.type == "Ready" and condition.status == "True" then
hs.status = "Healthy" hs.status = "Healthy"
hs.message = condition.message hs.message = condition.message
return hs return hs
end
end end
end end
end end
end
hs.status = "Progressing" hs.status = "Progressing"
hs.message = "Waiting for certificate" hs.message = "Waiting for certificate"
return hs return hs