Interview Prep/GitOps & Argo CD/Sync Behaviour, Waves & Hooks

An HPA scales your Deployment, but Argo CD with self-heal keeps resetting replicas to 2. What do you do?

BeginnerScenarioSync Behaviour, Waves & Hooks
Answer

Situation read → Two controllers fighting over spec.replicas.

What I'd do →

  1. Preferred: remove replicas from the Deployment manifest (Helm: omit it when autoscaling.enabled).
  2. If it must stay, add ignoreDifferences for /spec/replicas on that Deployment and RespectIgnoreDifferences=true.
  3. Verify with argocd app diff and watch kubectl get hpa,deploy -w.

Why → Whoever owns a field should be the only one writing it.

Interview tip → Mention why RespectIgnoreDifferences is needed: otherwise any sync still overwrites the field.

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

More on Sync Behaviour, Waves & Hooks