ApplicationSets for Dynamic Applications
What you'll learn: How ApplicationSet resources automatically generate multiple ArgoCD Applications from templates based on dynamic data sources.
The Core Idea
While you've seen ApplicationSets for multi-environment scenarios, they truly shine when generating Applications dynamically—meaning ArgoCD creates and manages Applications based on data it discovers at runtime rather than statically defined values. Think of it like a factory assembly line that automatically adjusts to build whatever parts arrive on the conveyor belt, rather than a fixed production schedule.
How Dynamic Generation Works
ApplicationSets use generators to discover and iterate over dynamic data. Common generators include:
- Git generator: Discovers directories or files in a Git repo
- List generator: Uses a manually defined list (less dynamic)
- Cluster generator: Discovers registered clusters automatically
- SCM provider generator: Queries GitHub/GitLab for repositories
- Pull request generator: Creates temp apps for each PR
When new data appears (a new directory, new cluster, new PR), ArgoCD automatically generates a corresponding Application. When the source disappears, the Application is removed.
Why This Matters
Imagine your team creates new microservices by adding directories to a Git repo. With dynamic ApplicationSets, each new directory automatically gets its own ArgoCD Application—no manual configuration needed. Similarly, when you register a new Kubernetes cluster, applications can auto-deploy there without editing manifests.
This is self-service infrastructure: developers follow conventions (like directory structure), and the platform responds automatically.
The Pattern
An ApplicationSet template defines the Application structure with placeholders. The generator feeds values into those placeholders for each discovered item, creating one Application per item dynamically.
Key Takeaway: ApplicationSets with dynamic generators enable self-service, convention-based application deployment where ArgoCD automatically responds to structural changes in your Git repositories, clusters, or SCM providers without manual intervention.