Application Sets
ApplicationSets dynamically generate ArgoCD Applications from templates, enabling consistent deployment of services across environments and tenants without manual Application creation for each service.
ApplicationSet Generators
| Generator | Use Case | Description |
|---|---|---|
| Git directory | Service discovery | Generates Applications from Helm chart directories |
| List | Multi-environment | Deploys the same chart to dev, staging, prod |
| Cluster | Multi-cluster | Deploys to multiple Kubernetes clusters |
| Matrix | Combined | Combines generators (e.g., services x environments) |
Control Plane ApplicationSet
Generates an Application for each control plane service:
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: control-plane-services
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/matih-labs/matih-prototype.git
revision: main
directories:
- path: infrastructure/helm/control-plane/*
template:
metadata:
name: "cp-{{path.basename}}"
spec:
project: control-plane
source:
repoURL: https://github.com/matih-labs/matih-prototype.git
path: "{{path}}"
targetRevision: main
helm:
valueFiles:
- values.yaml
- values-dev.yaml
destination:
server: https://kubernetes.default.svc
namespace: matih-control-plane
syncPolicy:
automated:
prune: true
selfHeal: trueData Plane ApplicationSet
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: data-plane-services
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/matih-labs/matih-prototype.git
revision: main
directories:
- path: infrastructure/helm/data-plane/*
template:
metadata:
name: "dp-{{path.basename}}"
spec:
project: data-plane
destination:
namespace: matih-data-plane
syncPolicy:
automated:
prune: true
selfHeal: trueMulti-Environment Matrix
Deploy services across environments using the Matrix generator:
generators:
- matrix:
generators:
- git:
directories:
- path: infrastructure/helm/control-plane/*
- list:
elements:
- env: dev
cluster: dev-cluster
- env: staging
cluster: staging-clusterSync Policies
| Policy | Behavior |
|---|---|
automated.prune | Delete resources removed from Git |
automated.selfHeal | Revert manual changes to match Git |
syncOptions.CreateNamespace | Auto-create namespace if missing |
retry.limit | Number of sync retry attempts |
Related Pages
- ArgoCD Setup -- ArgoCD installation and configuration
- Platform Versions -- Version pinning