When would you use `Replace=true` and `Force=true`?
AdvancedConceptThe Application CRD & Sync Policies
Answer
Replace=true makes Argo CD use kubectl replace (or create) instead of apply, which avoids the last-applied annotation size limit and three-way merge surprises. Adding Force=true deletes and recreates the object, needed when changing immutable fields such as a Deployment's spec.selector, a Job's template, or a Service's clusterIP. Both are dangerous on stateful or traffic-serving objects, so set them per resource with an annotation, not per app.
More on The Application CRD & Sync Policies
Walk through the key fields of an Argo CD `Application`.BeginnerWhat values can `targetRevision` take?BeginnerWhat is the difference between `destination.server` and `destination.name`?BeginnerWhat does `syncPolicy.automated` do, and what are its sub-fields?BeginnerWhy is `prune` disabled by default?BeginnerExplain `selfHeal`. When might you not want it?Intermediate