From 4b16c1b120a0f129bf993030caa5525a0459bc55 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Fri, 24 Sep 2021 20:08:45 +0700 Subject: [PATCH] feat(bootstrap): add Applications custom health check --- bootstrap/argocd/argocd-cm-patch.yaml | 20 ++++++++++++++++++++ bootstrap/argocd/kustomization.yaml | 1 + 2 files changed, 21 insertions(+) create mode 100644 bootstrap/argocd/argocd-cm-patch.yaml diff --git a/bootstrap/argocd/argocd-cm-patch.yaml b/bootstrap/argocd/argocd-cm-patch.yaml new file mode 100644 index 00000000..33db4f89 --- /dev/null +++ b/bootstrap/argocd/argocd-cm-patch.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-cm +data: + resource.customizations: | + argoproj.io/Application: + health.lua: | + hs = {} + hs.status = "Progressing" + hs.message = "" + if obj.status ~= nil then + if obj.status.health ~= nil then + hs.status = obj.status.health.status + if obj.status.health.message ~= nil then + hs.message = obj.status.health.message + end + end + end + return hs diff --git a/bootstrap/argocd/kustomization.yaml b/bootstrap/argocd/kustomization.yaml index 75121835..746c1fc8 100644 --- a/bootstrap/argocd/kustomization.yaml +++ b/bootstrap/argocd/kustomization.yaml @@ -9,5 +9,6 @@ resources: patches: - path: argocd-server-deployment-patch.yaml +- path: argocd-cm-patch.yaml namespace: argocd