`argocd app diff` shows only `replicas: 2` vs `replicas: 5` on a Deployment that has an HPA, and the app never stays Synced.
BeginnerTroubleshootingOutOfSync Loops & Diff Problems
Answer
Likely causes → The manifest declares spec.replicas while the HPA scales it.
Diagnose →
kubectl get hpa -n web
argocd app diff web
Fix → Remove replicas from the manifest (Helm: wrap it in {{- if not .Values.autoscaling.enabled }}), or:
ignoreDifferences:
- group: apps
kind: Deployment
jsonPointers: [/spec/replicas]
syncPolicy:
syncOptions: [RespectIgnoreDifferences=true]
Prevent → Standard chart pattern: never render replicas when autoscaling is enabled.
More on OutOfSync Loops & Diff Problems
An app flips between `Synced` and `OutOfSync` every few seconds and the sync history grows constantly.IntermediateA MutatingWebhookConfiguration is always OutOfSync on `webhooks[0].clientConfig.caBundle`.IntermediateAfter installing Istio, every Deployment shows OutOfSync because of injected sidecar fields.IntermediateA ConfigMap is OutOfSync and the diff shows the same data in a different format (a number became a string).BeginnerA Deployment is OutOfSync on `resources.limits.cpu`: Git says `1000m`, live says `1`.IntermediateAn app is OutOfSync on a field that is not in Git at all, after an Argo CD upgrade.Advanced