Course contentsShow
← Cloud and Infrastructure
Lesson 1914 of 2,98940. ArgoCDFree lesson

Resource Health Customization

Defining custom health checks for CRDs and resources to accurately reflect application health status.

Resource Health Customization

What you'll learn: How to define custom health checks for Custom Resource Definitions (CRDs) and resources so ArgoCD accurately understands when your applications are truly healthy.

The Problem with Default Health Checks

Out of the box, ArgoCD knows how to assess the health of standard Kubernetes resources like Deployments, StatefulSets, and Services. However, when you work with CRDs (Custom Resource Definitions) or third-party operators, ArgoCD doesn't automatically know what "healthy" means for these custom resources. Without customization, ArgoCD might report a resource as "Progressing" or "Unknown" when it's actually ready—or worse, show "Healthy" when something is broken.

Defining Custom Health Checks

ArgoCD allows you to configure custom health checks through Lua scripts that interpret the status of your resources. These configurations live in the argocd-cm ConfigMap under a special resource.customizations key.

Think of it like teaching ArgoCD a new language: Just as you'd explain to someone what "ready" means for a specific type of equipment, you're teaching ArgoCD how to read the status fields of your CRDs and determine health.

Common Use Cases

  • Database operators (like PostgreSQL Operator): checking if the database cluster is fully initialized
  • Certificate managers: verifying certificates are issued and valid
  • Custom controllers: interpreting application-specific status conditions
  • Third-party CRDs: translating vendor-specific health signals

The customization examines the resource's .status field and returns one of: Healthy, Progressing, Degraded, Suspended, or Missing.

Key Takeaway: Resource health customization teaches ArgoCD how to correctly interpret the health of CRDs and custom resources, ensuring your application status accurately reflects reality and preventing false positives or misleading deployment states.