argoproj/argo-cd
Sources and tooling
Argo CD supports plain-YAML directories, Helm charts (HTTP and OCI), Kustomize bases/overlays, OCI artifacts, and arbitrary Config Management Plugins. This page traces how each renderer is selected and where its code lives.
Source detection
reposerver/repository/repository.go is where the repo server decides which renderer to invoke. The decision tree (simplified):
graph TD
Source[ApplicationSource] --> IsOCI{OCI URL?}
IsOCI -- yes --> OCI[util/oci]
IsOCI -- no --> IsHelmField{source.helm set\nor chart present?}
IsHelmField -- yes --> Helm[util/helm]
IsHelmField -- no --> IsKustomize{kustomization.yaml found\nor source.kustomize set?}
IsKustomize -- yes --> Kustomize[util/kustomize]
IsKustomize -- no --> IsPlugin{source.plugin or sidecar match?}
IsPlugin -- yes --> CMP[util/cmp + cmpserver]
IsPlugin -- no --> Directory[Directory of YAML/JSON]Helm
| Path | Purpose |
|---|---|
util/helm/helm.go |
Higher-level helpers used by the repo server. |
util/helm/cmd.go |
Wrapper around the helm CLI. |
util/helm/client.go |
Helm chart repo and OCI registry client. |
util/helm/creds.go |
Auth: basic, bearer, OCI. |
util/helm/index.go |
Parses index.yaml for chart catalogs. |
Argo CD supports Helm 3 charts from:
- Classic chart repos (
https://charts.example.com) withindex.yaml. - OCI registries (any
oci://...URL). - Direct chart sources inside Git repos (
Chart.yamlin the source path).
Values can be inline, taken from values files in the same source, or merged from a different value source (multi-source applications).
Kustomize
| Path | Purpose |
|---|---|
util/kustomize/kustomize.go |
Wraps kustomize build and post-processes the output. |
Argo CD supports Kustomize image overrides, namespace overrides, common labels/annotations, replicas overrides, and inline patches via the source.kustomize block.
Directory of YAML/JSON
The repo server walks the source path and returns every YAML/JSON manifest. Helpful flags:
--include-hidden-directories— include.foodirectories.--allow-out-of-bounds-symlinks— relax the default symlink safety check.- Glob filters via the
argocd.argoproj.io/manifest-generate-pathsannotation.
A directory source can also evaluate Jsonnet (*.jsonnet).
OCI artifacts
util/oci/client.go implements a client capable of pulling pure OCI artifacts (not Helm charts) and extracting their layers as manifest sources. Combined with util/oci/registry.go, this supports docker.io / GHCR / ECR / GAR / Quay.
Config Management Plugins (CMP)
util/cmp/ and cmpserver/ host the plugin runtime. See CMP server for the protocol. The repo server matches a plugin by:
- A
source.plugin.namereference, or - The plugin's
discoverrules (file globs or shell commands) when the user opted into "auto-discovery".
OCI helm registries (legacy compat)
Helm OCI usage is one of the most-tweaked code paths because of subtle protocol differences across registries. util/helm/client.go and util/oci/client.go both contain registry-specific quirks (anonymous tokens for ECR, retry logic for transient 401s).
Multi-source applications
Application.spec.sources (in pkg/apis/application/v1alpha1/types.go) lets a single Application combine multiple sources. Common patterns:
- Helm chart from one repo, values files from another.
- Helm chart + a directory of supplemental manifests.
- Kustomize base from one repo, overlays from another.
The repo server renders each source in turn and the controller composes the result before applying.
See also
- Repo server — the host runtime.
- CMP server — plugin sidecars.
- Manifest hydrator — for the render-and-commit variant.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.