From fa60f10cf7fa6d905c21b33b90cc2a76983e2c2b Mon Sep 17 00:00:00 2001 From: nimjor <76883392+nimjor@users.noreply.github.com> Date: Wed, 17 Jan 2024 19:23:58 -0600 Subject: [PATCH] Argocd health update (#677) * Update lua snippet to cover additional status conditions/kinds with no status Signed-off-by: Jordan Nimlos * ArgoCD integration docs: ProviderConfig status Signed-off-by: Jordan Nimlos * remove comment from code snippet, add hint instead Signed-off-by: Jordan Nimlos --------- Signed-off-by: Jordan Nimlos Co-authored-by: Jordan Nimlos --- .../integrations/argo-cd-crossplane.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/content/knowledge-base/integrations/argo-cd-crossplane.md b/content/knowledge-base/integrations/argo-cd-crossplane.md index 5d1993a3..f74d124c 100644 --- a/content/knowledge-base/integrations/argo-cd-crossplane.md +++ b/content/knowledge-base/integrations/argo-cd-crossplane.md @@ -39,8 +39,11 @@ from `pkg.crossplane.io` has already been declared which means there no further Argo CD also enable customising these checks per instance, and that's the mechanism used to provide support of Provider's CRDs. -To configure it, edit the `argocd-cm` `ConfigMap` in the `argocd` `Namespace` as such: -```yaml +To configure it, edit the `argocd-cm` `ConfigMap` in the `argocd` `Namespace`. +{{}} +{{}} ProviderConfig{{}} may have no status or a `status.users` field. +{{}} +```yaml {label="argocfg"} apiVersion: v1 kind: ConfigMap data: @@ -63,6 +66,7 @@ data: end local has_no_status = { + "ProviderConfig", "ProviderConfigUsage" } @@ -73,6 +77,11 @@ data: end if obj.status == nil or obj.status.conditions == nil then + if obj.kind == "ProviderConfig" and obj.status.users != nil then + health_status.status = "Healthy" + health_status.message = "Resource is in use." + return health_status + end return health_status end