Patrick’s neat write-up of ArgoCD health checks does a pretty good explanation of how they work and where to find the default ones coming with ArgoCD out-of-the-box … and is quite worth a read!
To quickly summarize, resources’ health checks decide if your resources displayed in ArgoCD gui are either in state healthy, progressing or degraded (and there is also suspended, allthough that one is rather seldom used).
So what if you introduce a new resource (eg by CRD) or use one that ArgoCD does not provide a pre-packaged health check? Simply create or override your own copy of health check by adding it via the
resource.customizations field into argocd-cm Configmap.
I myself was not too happy with ArgoCD’s version of
operators.coreos.com/Subscription health check: Because most of my deployed operators are using manual update strategy, ArgoCD would put these operators in state Progressing, whenever a new version was released via OLM, and the operator’s subscription thus went into status
Quite often ArgoCD was now in state progressing, which - at least to me - was confusing, and so I decided to change this.
Health checks are written in LUA and quite easy to adapt. In this configmap code snippet you can see that I added a single condition for the
manual InstallPlanApproval strategy, and now my operators show up as degraded instead of progressing.
One can easily change that to suspended which would fit even better in this case.