This repository demonstrates various ArgoCD ApplicationSet patterns for managing applications across different environments and clusters. Each pattern addresses specific organizational needs and scales.
Use Case: Small to medium teams with a fixed set of services and predictable deployment requirements.
- Teams: 1-5 teams
- Services: 5-20 services (fixed list)
- Environments: Multiple environments (dev, staging, production)
- Clusters: Single or small number of clusters
- Configuration: Hardcoded service list in ApplicationSet spec
- Uses
listgenerator with predefined service elements - Simple matrix combination of services and clusters
- Direct path mapping to Helm charts
.argocd/static/list.yaml- Basic static list implementationhelm/directory - Individual service Helm charts
- Small development teams
- Stable service portfolio
- Simple deployment requirements
- Limited infrastructure complexity
Use Case: Organizations with multiple clusters but a fixed set of services requiring selective deployment.
- Teams: 1-5 teams
- Services: 5-20 services (fixed list)
- Environments: Multiple environments across clusters
- Clusters: 2-5 clusters with selective deployment
- Configuration: Service-specific cluster inclusion/exclusion rules
- Uses
matrixgenerator combininglistgenerators for clusters and services - Advanced selector logic with
exclude/includemechanisms - Go template support for complex conditional logic
- Template patching for service-specific configurations
.argocd/static/multicluster-with-include-exclude.yaml- Multi-cluster with selective deployment- Service-specific Helm parameters and sync policies
- Multi-cluster environments
- Services with different cluster requirements
- Need for selective deployment control
- Environment-specific service configurations
Use Case: Growing organizations with many services that need automatic discovery and deployment.
- Teams: 5-20 teams
- Services: 20-100+ services (auto-discovered)
- Environments: Multiple environments
- Clusters: Multiple clusters with dynamic selection
- Configuration: Git-based service discovery with runtime configuration
- Uses
gitgenerator to discover services from repository structure - Runtime configuration files (e.g.,
runtime/stg-backend.yaml) - Dynamic cluster selection with include/exclude mechanisms
- Advanced selector logic for deployment control
.argocd/dynamic/multicluster-wiith-include-exclude.yaml- Git-based discovery with cluster selection.argocd/dynamic/remote-source.yaml- Runtime configuration-based deploymentruntime/stg-backend.yaml- Service configuration file
- Large number of services
- Frequent service additions/removals
- Need for automatic service discovery
- Dynamic deployment requirements
Use Case: Complex organizations requiring fine-grained control over individual service deployments with service-specific configurations.
- Teams: 10-50+ teams
- Services: 50-200+ services
- Environments: Multiple environments with complex requirements
- Clusters: Multiple clusters with sophisticated routing
- Configuration: Service-specific
.argocd.yamlfiles with metadata-driven deployment
- Uses
gitgenerator to discover.argocd.yamlfiles - Service-specific configuration files (
.argocd.yaml) - Metadata-driven deployment with template patching
- Advanced cluster selection based on service metadata
- Support for service-specific sync policies, labels, and annotations
.argocd/dynamic/multicluster-with-cluster-selection.yaml- Cluster selection based on service metadatahelm/*/.argocd.yaml- Service-specific configuration fileskustomize/*/*/stg/.argocd.yaml- Environment-specific service configurations
- Large, complex organizations
- Services with unique deployment requirements
- Need for fine-grained deployment control
- Complex multi-cluster routing requirements
- Service-specific operational policies
Use Case: Organizations using both Kustomize and Helm for different types of applications.
- Teams: 5-30 teams
- Services: 20-100 services (mixed Kustomize/Helm)
- Environments: Multiple environments
- Clusters: Multiple clusters
- Configuration: Mixed deployment strategies with unified management
- Supports both Helm charts and Kustomize overlays
- Service-specific configuration files for both deployment types
- Unified ApplicationSet managing different deployment strategies
- Environment-specific overlays and values
helm/directory - Helm-based serviceskustomize/directory - Kustomize-based services- Mixed
.argocd.yamlconfigurations
- Mixed deployment strategies
- Legacy applications alongside new services
- Different teams using different tools
- Gradual migration scenarios
| Pattern | Complexity | Scalability | Flexibility | Use Case |
|---|---|---|---|---|
| Static List | Low | Low-Medium | Low | Small teams, fixed services |
| Static Multi-Cluster | Medium | Medium | Medium | Multi-cluster, selective deployment |
| Dynamic Git-Based | Medium-High | High | High | Growing organizations, auto-discovery |
| Advanced Service-Specific | High | Very High | Very High | Complex organizations, fine-grained control |
| Hybrid Kustomize + Helm | High | High | Very High | Mixed deployment strategies |
- Choose the appropriate pattern based on your organization size and requirements
- Review the example files in the corresponding
.argocd/subdirectories - Customize the configurations for your specific environment and services
- Test with a subset of services before full deployment
- Graduate to more complex patterns as your organization grows
Each pattern builds upon the previous ones, allowing for gradual adoption and complexity management as your GitOps practices mature.
If you prefer premises that are more use case–oriented, refer to the usecases collection.