Maven / GitOps Interview Questions
What are Argo CD sync policies — automated vs manual — and sync waves?
Manual sync (default): Argo CD detects drift and marks the Application OutOfSync, but applies nothing until a human explicitly triggers synchronisation via the UI, argocd app sync CLI, or an API call. Suitable for production environments where deployments need explicit human approval.
Automated sync: Configured via syncPolicy.automated. Argo CD syncs automatically as soon as it detects a Git change or live-state drift. Two sub-options refine the behaviour:
prune: true— Argo CD deletes Kubernetes resources that exist in the cluster but have been removed from Git. Without this, removed manifests leave orphaned resources.selfHeal: true— Argo CD re-applies Git state when live state drifts (e.g., someone ran kubectl manually). Without this, automated sync only fires on Git changes, not on live drift.
Sync waves control the order in which resources are created within a single sync operation. Resources are annotated with a wave number; lower-numbered waves sync first. Argo CD waits for all resources in wave N to become healthy before starting wave N+1. This is essential for ordering CRD creation before CR creation, database migrations before application pods, or secrets before deployments.
# Automated sync policy with pruning and self-healing
spec:
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
# Sync wave: migration Job (wave 1) runs and completes before app (wave 2)
apiVersion: batch/v1
kind: Job
metadata:
name: db-migration
annotations:
argocd.argoproj.io/sync-wave: "1"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
annotations:
argocd.argoproj.io/sync-wave: "2"
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
