Interview Prep/Helm/Hooks, Tests, GitOps & Secrets

A `pre-install` hook in a third-party chart runs on every Argo CD sync and resets data.

AdvancedTroubleshootingHooks, Tests, GitOps & Secrets
Answer

Likely causes → Argo CD maps both pre-install and pre-upgrade to PreSync, so install-only hooks run on each sync.

Diagnose → kubectl get jobs -n <ns> --sort-by=.metadata.creationTimestamp shows a new Job per sync.

Fix → Override with Argo CD annotations through a post-render step (Kustomize patch adding argocd.argoproj.io/hook: Skip or a different hook), disable the hook via chart values if offered, or make the job idempotent.

Prevent → Review chart hooks before adopting third-party charts in Argo CD.

All Helm questions Roadmap: Helm

More on Hooks, Tests, GitOps & Secrets