fix(argocd): update custom health check for ArgoCD applications

This commit is contained in:
Khue Doan 2021-10-04 00:40:05 +07:00
parent 1a6f40ff5a
commit fdfd5fb2c9

View File

@ -3,18 +3,16 @@ kind: ConfigMap
metadata: metadata:
name: argocd-cm name: argocd-cm
data: data:
resource.customizations: | resource.customizations.health.argoproj.io_Application: |
argoproj.io/Application: hs = {}
health.lua: | hs.status = "Progressing"
hs = {} hs.message = ""
hs.status = "Progressing" if obj.status ~= nil then
hs.message = "" if obj.status.health ~= nil then
if obj.status ~= nil then hs.status = obj.status.health.status
if obj.status.health ~= nil then if obj.status.health.message ~= nil then
hs.status = obj.status.health.status hs.message = obj.status.health.message
if obj.status.health.message ~= nil then
hs.message = obj.status.health.message
end
end
end end
return hs end
end
return hs