Tracking and Deployment Strategies¶
An Argo CD application spec provides several different ways of tracking Kubernetes resource manifests.
In all tracking strategies, the app has the option to sync automatically. If auto-sync is configured, the new resources manifests will be applied automatically -- as soon as a difference is detected.
In all tracking strategies, any parameter overrides take precedence over the Git state.
For Helm, all versions are Semantic Versions. As a result, you can either version ranges:
|Pin to a version (e.g. in production)||Use the version number||
|Track patches (e.g. in pre-production)||Use a range||
|Track minor releases (e.g. in QA)||Use a range||
|Use the latest (e.g. in local development)||Use star range||
For Git, all versions are Git references:
|Pin to a version (e.g. in production)||Either (a) tag the commit with (e.g.
||See commit pinning.|
|Track patches (e.g. in pre-production)||Tag/re-tag the commit, e.g. (e.g.
||See tag tracking|
|Track minor releases (e.g. in QA)||Re-tag the commit as (e.g.
||See tag tracking|
|Use the latest (e.g. in local development)||Use
||See HEAD / Branch Tracking|
HEAD / Branch Tracking¶
If a branch name, or a symbolic reference (like HEAD) is specified, Argo CD will continually compare live state against the resource manifests defined at the tip of the specified branch or the resolved commit of the symbolic reference.
To redeploy an app, make a change to (at least) one of your manifests, commit and push to the tracked branch/symbolic reference. The change will then be detected by Argo CD.
If a tag is specified, the manifests at the specified Git tag will be used to perform the sync comparison. This provides some advantages over branch tracking in that a tag is generally considered more stable, and less frequently updated, with some manual judgement of what constitutes a tag.
To redeploy an app, the user uses Git to change the meaning of a tag by retagging it to a different commit SHA. Argo CD will detect the new meaning of the tag when performing the comparison/sync.
If a Git commit SHA is specified, the app is effectively pinned to the manifests defined at the specified commit. This is the most restrictive of the techniques and is typically used to control production environments.
Since commit SHAs cannot change meaning, the only way to change the live state of an app which is pinned to a commit, is by updating the tracking revision in the application to a different commit containing the new manifests. Note that parameter overrides can still be set on an app which is pinned to a revision.