Skip to main content
Argo CD provides flexible strategies for tracking application sources and deployed resources. Understanding these strategies helps you implement effective deployment workflows for different environments.

Git Tracking Strategies

Argo CD supports multiple ways to track your Git repository, each suited for different use cases.

HEAD / Branch Tracking

Track the tip of a branch for continuous deployment:
Use cases:
  • Development environments
  • Continuous deployment pipelines
  • Automatic updates on every commit
How it works: Argo CD continuously monitors the branch and compares live state against the latest commit. Any new commit triggers a comparison (and sync if auto-sync is enabled).
With auto-sync enabled, every push to the tracked branch automatically deploys to your cluster.

Tag Tracking

Track a specific Git tag for more stable deployments:
Use cases:
  • Staging environments
  • Release-based deployments
  • Controlled updates
How it works: Argo CD uses manifests at the specified tag. To deploy a new version, retag or change the Application’s targetRevision.
If you retag the same tag name to a different commit, Argo CD will detect the change and sync accordingly.

Semantic Version Ranges

Automatically track the latest version within a range:
Version range examples:
By default, prerelease versions (alpha, beta, rc) are excluded. Use the -0 suffix to include them.
Examples:

Commit SHA Pinning

Pin to a specific commit for maximum control:
Use cases:
  • Production environments
  • Strict change control
  • Compliance requirements
How it works: Commit SHAs are immutable. The only way to change deployment is to update the Application’s targetRevision to a different commit SHA.
Parameter overrides still apply even with commit pinning.

Handling Ambiguous Git References

When a branch and tag share the same name, use fully-qualified references: Problem scenario:
If targetRevision: release-1.0, Argo CD may resolve to either commit, causing reconciliation loops. Solution: Use fully-qualified references:
Avoid using the same name for branches and tags to prevent ambiguity.

Helm Chart Tracking

Helm charts use semantic versioning:
Version tracking examples:

Resource Tracking Methods

Argo CD tracks deployed resources using labels or annotations.

Annotation-Based Tracking (Default)

Uses the argocd.argoproj.io/tracking-id annotation:
Advantages:
  • No conflicts with other tools
  • No 63-character truncation limit
  • Clear ownership per Argo CD instance
Configure in argocd-cm:

Annotation + Label Tracking

Uses annotation for tracking, adds label for compatibility:
Configure:
The label is informational only and truncated if longer than 63 characters. Tracking uses the annotation.

Label-Based Tracking (Legacy)

Uses the app.kubernetes.io/instance label:
Limitations:
  • 63-character label limit
  • Potential conflicts with other tools
  • Difficult to run multiple Argo CD instances
Configure:

Custom Label

Use a custom label instead of the default:

Installation ID

Run multiple Argo CD instances on the same cluster:
Benefits:
  • Each resource gets: argocd.argoproj.io/installation-id: production-argocd
  • Prevents conflicts between instances
  • Allows multiple apps with the same name

Non-Self-Referencing Annotations

When using annotation-based tracking, resources can be copied to other namespaces without affecting sync status:
If a tool copies this to namespace other:
Argo CD won’t track the copied resource because the tracking annotation references a different namespace.

Tracking Strategy Examples

Development Environment

Staging Environment

Production Environment

Helm Chart with Version Range

Automatic Sync Behavior

With auto-sync enabled:
Sync triggers:
  • New commit to tracked branch
  • Tag update (if tracking a tag)
  • New version matching semantic range
  • Manual changes in cluster (if selfHeal: true)
Sync semantics:
  • Only syncs when OutOfSync
  • Won’t retry if previous sync to same commit failed
  • Retries after self-heal timeout (5s default) if selfHeal: true
Parameter overrides always take precedence over Git state.

Changing Tracking Methods

To switch tracking methods:
  1. Update argocd-cm ConfigMap:
  2. Sync all applications to apply new tracking method:
  3. Argo CD will add the new tracking identifier to resources
You can safely revert to a previous tracking method by updating the ConfigMap and re-syncing.

Best Practices

Match Strategy to Environment

Use HEAD for dev, ranges for staging, pins for production

Use Annotation Tracking

Avoid label conflicts and truncation issues

Avoid Ambiguous References

Don’t use same name for branches and tags

Semantic Versioning

Use semver tags for predictable version tracking

Troubleshooting

Application Not Detecting Changes

  1. Verify target revision:
  2. Check if tracking a branch:
  3. Force refresh:

Resources Not Tracked

  1. Check tracking annotation:
  2. Verify tracking method in ConfigMap:
  3. Re-sync application to apply tracking:

Version Range Not Working

  1. Verify tags exist:
  2. Check if tags are semver:
  3. Include prereleases if needed:

Next Steps

Sync Options

Configure how applications sync

Sync Waves

Control deployment order

Creating Apps

Learn how to create applications

Health Checks

Monitor application health