k8wiz
Argo CD
Medium
Application Management

What does setting spec.syncPolicy.preserveResourcesOnDeletion to true change in an ApplicationSet?

Select your answer:

Show answer and explanation

Answer: Applications get no resources finalizer, so their workloads stay

Explanation

Without this setting, the ApplicationSet controller adds resources-finalizer.argocd.argoproj.io to each generated Application, so deleting the Application also deletes what it deployed. With it set to true the finalizer isn't added: Applications can still be deleted, but their resources stay in the cluster. Keeping the Applications themselves is the job of applicationsSync: create-update.

Read more about Argo CD