Open-Source Wikis

/

Argo CD

/

Primitives

/

Application

argoproj/argo-cd

Application

The Application CRD is the central object of Argo CD. It binds one or more sources (Git/Helm/OCI) to a destination (cluster + namespace) and carries the desired sync/refresh policy and observed status.

Schema (selected fields)

The Go type is in pkg/apis/application/v1alpha1/types.go. Major fields:

Field Purpose
spec.source (single source) or spec.sources (multi-source) Where to fetch desired state from.
spec.destination.server / name + namespace Where to apply manifests.
spec.project Which AppProject this Application belongs to.
spec.syncPolicy.automated Auto-sync (prune, selfHeal, allowEmpty).
spec.syncPolicy.retry Retry/backoff config.
spec.syncPolicy.syncOptions Per-app sync options (Validate=false, CreateNamespace=true, ServerSideApply=true, …).
spec.ignoreDifferences Per-resource diff suppressions.
spec.info Free-form key/value metadata shown in the UI.
spec.revisionHistoryLimit Retention count for status.history.
spec.sourceHydrator Opt-in for the manifest hydrator (see features/manifest-hydrator).
status.sync.status Synced, OutOfSync, or Unknown.
status.health.status Healthy, Progressing, Degraded, Suspended, Missing, Unknown.
status.operationState The most recent sync operation's progress and result.
status.history[] Past deployments with revision, source, started/finished.
status.resources[] Per-resource sync/health rolled up from the comparison.

Source shapes

Source is a discriminated union (in protocol terms): exactly one of helm, kustomize, directory, or plugin is meaningful per source. Common shapes:

# Plain directory of YAML/JSON
source:
  repoURL: https://github.com/example/manifests.git
  path: prod
  targetRevision: HEAD
# Helm
source:
  repoURL: https://example.com/charts
  chart: my-chart
  targetRevision: 1.2.3
  helm:
    valueFiles: [values.yaml, values-prod.yaml]
    parameters:
      - name: image.tag
        value: v1.2.3
# Kustomize
source:
  repoURL: https://github.com/example/manifests.git
  path: overlays/prod
  kustomize:
    images: [my-image:v1.2.3]
# Multi-source
sources:
  - repoURL: https://example.com/charts
    chart: my-chart
    targetRevision: 1.2.3
    helm:
      valueFiles:
        - $values/envs/prod/values.yaml
  - repoURL: https://github.com/example/values.git
    targetRevision: HEAD
    ref: values

Lifecycle annotations

Argo CD recognises several annotations on Application resources:

  • argocd.argoproj.io/sync-options — per-resource overrides of syncOptions.
  • argocd.argoproj.io/manifest-generate-paths — narrows which paths in a Git repo trigger a refresh.
  • argocd.argoproj.io/refresh: hard|normal — triggers a one-shot refresh.
  • argocd.argoproj.io/skip-reconcile: true — pauses reconciliation.
  • notified.notifications.argoproj.io — written by the notifications controller.
  • The hook annotations (argocd.argoproj.io/hook, argocd.argoproj.io/hook-delete-policy, argocd.argoproj.io/sync-wave).

The constants live in pkg/apis/application/v1alpha1/application_annotations.go and the user-facing docs are at docs/user-guide/.

Defaults

pkg/apis/application/v1alpha1/application_defaults.go documents the defaults that the API server applies on create/update — for example the in-cluster destination shorthand https://kubernetes.default.svc.

See also

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Application – Argo CD wiki | Factory