Interview Prep/GitOps & Argo CD/OutOfSync Loops & Diff Problems

An app is OutOfSync on a field that is not in Git at all, after an Argo CD upgrade.

AdvancedTroubleshootingOutOfSync Loops & Diff Problems
Answer

Likely causes → Diff behaviour changed between versions (normalization, server-side diff defaults, tracking method change), or the last-applied-configuration annotation contains the field from an older manifest so three-way diff still considers it yours.

Diagnose →

argocd app diff web
kubectl get <kind> <name> -o jsonpath='{.metadata.annotations.kubectl\.kubernetes\.io/last-applied-configuration}' | jq .

Fix → Sync once to refresh last-applied-configuration; if the field is defaulted, use server-side diff; if tracking changed, re-sync to add the new tracking annotation.

Prevent → Upgrade a staging instance first and compare the count of OutOfSync apps before and after.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on OutOfSync Loops & Diff Problems