GitOps & ArgoCD (50 Qs)•Part 3: Enterprise Scale, Security & Edge GitOps (Senior / Staff)
Argo CD Extensions and Resource Customizations: Custom health checks and action definitions.
senior LevelCode ExampleSecurity & Auth
In Simple Words:
Out of the box, ArgoCD knows the health status of standard Kubernetes resources (Deployment, Service). For third-party CRDs (e.g. Cert-Manager Certificate, Kafka KafkaTopic), ArgoCD might display them as indefinitely "Progressing".
You define custom Lua scripts inside the argocd-cm ConfigMap to tell ArgoCD when a custom resource is truly healthy:
yaml
resource.customizations.health.cert-manager.io_Certificate: |
hs = {}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
if condition.type == "Ready" and condition.status == "True" then
hs.status = "Healthy"
hs.message = "Certificate is valid"
return hs
end
end
end
end
hs.status = "Progressing"
return hs