Overview
Argo CD provides built-in health assessments for standard Kubernetes resources and allows custom health checks for CRDs and special cases. Application health is determined by the worst health of its immediate child resources:- Healthy > Suspended > Progressing > Missing > Degraded > Unknown
Resource health is not inherited from child resources. A Deployment’s health is based only on its own status, not its Pods.
Built-in Health Checks
Deployment, ReplicaSet, StatefulSet, DaemonSet
Healthy when:- Observed generation equals desired generation
- Number of updated replicas equals desired replicas
Service (LoadBalancer)
Healthy when:- Service type is
LoadBalancer status.loadBalancer.ingresslist has at least one IP or hostname
Ingress
Healthy when:status.loadBalancer.ingresslist has at least one IP or hostname
PersistentVolumeClaim
Healthy when:status.phaseisBound
Job
- Suspended: If
spec.suspendedistrue - Healthy: If job completed successfully
- Degraded: If job failed
CronJob
- Degraded: If last scheduled job failed
- Progressing: If last scheduled job is running
- Healthy: Otherwise
Health Status Types
Custom Health Checks
Define custom health checks in Lua for CRDs or to override built-in checks.Method 1: ConfigMap Configuration
Add custom health checks to theargocd-cm ConfigMap:
Wildcard Health Checks
Apply a single health check to multiple resources:Wildcard patterns only work with the
resource.customizations key format, not resource.customizations.health.<group>_<kind>.Example: Crossplane Resources
Example: Custom Application CRD
Enabling Lua Standard Libraries
By default, standard Lua libraries are disabled for security. Enable them per resource:Method 2: Contribute Built-in Health Check
Contribute health checks directly to Argo CD’s codebase:go test -v ./util/lua/
Overriding Built-in Health Checks
Override Go-based health checks with Lua:- PersistentVolumeClaim
- Pod
- Service
- apiregistration.k8s.io/APIService
- apps/DaemonSet
- apps/Deployment
- apps/ReplicaSet
- apps/StatefulSet
- argoproj.io/Workflow
- autoscaling/HorizontalPodAutoscaler
- batch/Job
- extensions/Ingress
- networking.k8s.io/Ingress
Ignoring Resource Health
Exclude specific resources from affecting application health:The application will not be affected by this Deployment’s health status.
Argo CD Application Health Check
Argo CD removed the built-in health check forargoproj.io/Application in v1.8. Restore it for App-of-Apps patterns:
Health Check Examples
Example: Kafka Topic (Strimzi)
Example: Sealed Secret
Example: External Secrets
Testing Health Checks
Test health checks locally before deploying:Troubleshooting
Resource Shows as Progressing Forever
-
Check if a custom health check exists:
-
Inspect resource status:
-
Check Argo CD application controller logs:
Custom Health Check Not Working
-
Verify ConfigMap format (key should be
resource.customizations.health.<group>_<kind>) - Check for Lua syntax errors in controller logs
- Ensure the resource group and kind match exactly
-
Restart application controller:
Application Shows Wrong Health
Remember: Application health is the worst health of immediate child resources:Best Practices
Start Simple
Begin with built-in checks before writing custom logic
Use Conditions
Leverage Kubernetes status conditions for consistent checks
Return Messages
Always provide meaningful health messages for debugging
Test Thoroughly
Create test cases for all health states
Next Steps
Sync Waves
Wait for resources to be healthy between waves
Resource Hooks
Run validation hooks after resources are healthy
Sync Options
Configure sync behavior
Creating Apps
Learn how to create applications