Skip to main content
Directory-type applications load plain Kubernetes manifest files from .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:
boolean
Include files from subdirectories recursively

CLI Usage

Directory-type applications only work for plain manifest files. If Argo CD encounters Kustomize, Helm, or Jsonnet files when directory: is set, it will fail to render the manifests.

Include Patterns

Include only specific files or directories:
string
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:
string
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:
Example repository structure:
With the above configuration:
  • 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:
Add the # +argocd:skip-file-rendering comment anywhere in the file to prevent Argo CD from parsing it as a manifest.

Common Use Cases

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