.yml, .yaml, and .json files. This is the simplest source type in Argo CD.
Basic Directory Application
Argo CD automatically detects plain manifests:It’s unnecessary to explicitly add the
spec.source.directory field unless you need additional configuration options. Argo CD automatically detects plain manifest files.Recursive Resource Detection
By default, only files in the root of the configured path are included. Enable recursive detection to include subdirectories:Include files from subdirectories recursively
CLI Usage
Include Patterns
Include only specific files or directories:Glob pattern to match files to include
Examples
Quote patterns in the shell to prevent expansion before sending to Argo CD.
Exclude Patterns
Exclude files matching specific patterns:Glob pattern to match files to exclude
Examples
Combined Include and Exclude
When both are specified, files must match the include pattern AND not match the exclude pattern:deployment.yaml- Included (matches*.yaml, doesn’t match exclude)env-use2/configmap.yaml- Included (with recurse enabled)config.json- Excluded (doesn’t match*.yaml)env-usw2/configmap.yaml- Excluded (matches exclude pattern)
Skip File Rendering
Some YAML files may resemble Kubernetes manifests but aren’t intended to be deployed (e.g., Helm values.yaml, CI/CD configs). Skip these files:Common Use Cases
Deploy from a manifests directory
Deploy from a manifests directory
Include only production configs
Include only production configs
Exclude test and development files
Exclude test and development files
YAML only, no JSON
YAML only, no JSON
When to Use Directory Type
Good For
- Simple applications with static manifests
- Quick prototypes and demos
- Applications without templating needs
- Teams preferring explicit YAML
Consider Alternatives
- Multi-environment deployments → Use Kustomize
- Parameterized deployments → Use Helm
- Dynamic generation → Use Jsonnet or plugins
- Complex configurations → Use config management tools