Application Dependencies
What you'll learn: How to control the order in which ArgoCD deploys applications so that dependent services start only after their prerequisites are ready.
In real deployments, applications rarely stand alone. Your API server needs the database up first, your frontend needs the backend, and configuration services must precede everything else. ArgoCD needs explicit instructions to respect these dependencies—otherwise it might try syncing everything simultaneously, causing failures when dependent apps can't find their prerequisites.
Why Dependencies Matter
Without dependency management, ArgoCD treats all applications as independent. If you define 10 applications, ArgoCD will attempt to sync them concurrently. This works fine for isolated services but breaks when App B queries App A during startup or relies on App A's config data.
Think of it like building a house: you can't install the roof before the walls exist. Dependencies enforce this construction order in your deployments.
Managing Sync Order
ArgoCD doesn't have native "depends_on" fields in the Application spec, but you can control order through:
Sync Waves (covered in Resource Hooks): Annotate Kubernetes resources with argocd.argoproj.io/sync-wave to control ordering within an application.
Application-Level Ordering: Deploy foundation applications first (databases, message queues), then mid-tier services, then user-facing apps. Use separate ArgoCD Projects or manual sync controls to stage rollouts.
Health Checks: Configure custom health assessments so ArgoCD considers an app "healthy" only when it's truly ready. Dependent apps can wait for upstream services to report healthy before syncing.
ApplicationSets with Dependencies: When using App-of-Apps patterns, structure your parent application to create child apps sequentially based on their readiness.
Practical Approach
Most teams handle dependencies by organizing applications into tiers—infrastructure, platform services, applications—and syncing each tier only after the previous tier is healthy. This manual orchestration is more reliable than trying to encode complex dependency graphs.
Key Takeaway: ArgoCD doesn't automatically understand application dependencies; use sync waves, health checks, and staged deployment strategies to ensure services start in the correct order.