ArgoCD › Sync & Health
How can you customize health checks for third-party or custom resources?
AdvancedAnswer
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 hsReal-world example A Certificate resource reports Healthy only once its Ready condition is true, thanks to a custom Lua check.