An operator creates child resources that inherit Argo CD's tracking metadata, and the app shows them as extraneous and wants to prune them. What do you do?
AdvancedScenarioSync Behaviour, Waves & Hooks
Answer
Situation read → Generated objects copied labels or annotations from a tracked parent.
What I'd do →
- Switch to annotation tracking (default in 3.x) if still on label tracking, because operators often copy labels like
app.kubernetes.io/instance. - Annotate generated objects (or configure the operator to set)
argocd.argoproj.io/compare-options: IgnoreExtraneous. - Disable prune for those kinds if needed, and file an issue with the operator to stop copying tracking metadata.
Why → Argo CD believes it owns anything carrying its tracking ID; without care it prunes operator output.
Interview tip → This is exactly why annotation tracking became the default.
More on Sync Behaviour, Waves & Hooks
A new release needs a database migration that must finish before the new pods start. How do you implement it in Argo CD?IntermediateYour app needs cert-manager's CRDs, an Issuer and then a Certificate, all in one Application. The first sync fails. What do you do?IntermediateAfter enabling `prune: true`, someone renames a folder and the next sync would delete a production StatefulSet and its PVCs. How do you prevent this class of incident?AdvancedYou want a smoke test to run after every deploy and mark the sync failed if it fails. How?BeginnerAn HPA scales your Deployment, but Argo CD with self-heal keeps resetting replicas to 2. What do you do?BeginnerYou must change a Deployment's label selector, which is immutable. How do you roll it out with Argo CD?Advanced