What do prune and selfHeal do in an automated sync policy?
⚡
Quick Answer
prune deletes resources removed from Git; selfHeal reverts manual cluster changes back to Git.
Detailed Answer
Automated sync applies Git changes without a manual click. prune: true removes orphans when you delete a manifest — without it, deleted resources linger. selfHeal: true undoes drift like a manual kubectl scale within seconds, enforcing that Git always wins. Together they make the cluster fully declarative.
Code Example
syncPolicy:
automated:
prune: true
selfHeal: true💡
Interview Tip
Explain why prune matters: otherwise deletions never propagate.
argocdselfhealprune