ArgoCD › Sync & Health

How can you customize health checks for third-party or custom resources?

Advanced

Answer

Add Lua scripts under resource.customizations.health in the argocd-cm ConfigMap keyed by group_kind. The script inspects the resource's status and returns a health status and message. ArgoCD ships many built-ins (e.g., for cert-manager, Rollouts); you add scripts for CRDs it doesn't know so aggregated app health is accurate.
resource.customizations.health.cert-manager.io_Certificate: |
  hs = {}
  for i, c in ipairs(obj.status.conditions) do
    if c.type == "Ready" and c.status == "True" then
      hs.status = "Healthy"; return hs
    end
  end
  hs.status = "Progressing"; return hs
Real-world example A Certificate resource reports Healthy only once its Ready condition is true, thanks to a custom Lua check.

Common follow-ups: Where are custom health scripts stored? | What does a Lua health script return?