The Problem
Your ArgoCD application is permanently stuck in OutOfSync status regardless of how many times you sync.
Root Cause
This is different from a temporary sync issue. The application is stuck because:
- Mutating admission webhooks change resources after deployment
- Kubernetes defaulting adds fields not in your manifests
- Another controller (HPA, Istio, Kyverno) modifies the resource
Fix
Step 1: Find the Diff
argocd app diff my-appStep 2: Add ignoreDifferences
spec:
ignoreDifferences:
- group: apps
kind: Deployment
jsonPointers:
- /spec/replicas
- group: networking.istio.io
kind: VirtualService
jqPathExpressions:
- .metadata.generationStep 3: Use Server-Side Apply
spec:
syncPolicy:
syncOptions:
- ServerSideApply=trueServer-side apply lets Kubernetes handle field ownership conflicts, often resolving persistent OutOfSync issues.
