{
  "slug": "argo-cd-supports-predelete-hooks-70c82cdb5ebe",
  "title": "Argo CD supports PreDelete hooks",
  "tools": [
    "argocd"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-02-02T08:13:58.000Z",
  "announced_at": "2026-02-02T08:13:58.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When an Argo CD Application is deleted, define a `PreDelete` hook to run cleanup before its resources are deleted. It does not run during normal sync, including pruning.",
    "examples": [
      "apiVersion: batch/v1\nkind: Job\nmetadata:\n  name: <cleanup-job>\n  annotations:\n    argocd.argoproj.io/hook: PreDelete\nspec:\n  template:\n    spec:\n      containers:\n        - name: cleanup\n          image: <image>\n          command: [\"<cleanup-command>\"]\n      restartPolicy: Never",
      "# Helm chart template annotation:\nhelm.sh/hook: pre-delete"
    ],
    "gotchas": [
      "Version: v3.3.0",
      "argocd.argoproj.io/hook (required): Set to `PreDelete` to run the resource before Application resources are deleted.",
      "helm.sh/hook: Set to `pre-delete` in a Helm chart; documented as equivalent to the Argo CD `PreDelete` hook annotation.",
      "metadata.annotations (required): Place the hook annotation on the resource manifest.",
      "Prerequisite: Use an Argo CD version that supports PreDelete hooks; this change is documented in v3.3.0.",
      "Prerequisite: The hook must be defined in the Application's manifests. Argo CD waits for PreDelete hooks to reach Healthy before continuing deletion.",
      "PreDelete runs only when the entire Application is deleted, not during normal sync operations, including pruning."
    ]
  },
  "why_it_matters": "Run a cleanup hook before deleting an Application's resources.",
  "sources": [
    "https://github.com/argoproj/argo-cd/releases/tag/v3.3.0",
    "https://github.com/argoproj/argo-cd/pull/22288",
    "https://github.com/argoproj/argo-cd/blob/v3.3.0/docs/user-guide/sync-waves.md",
    "https://github.com/argoproj/argo-cd/blob/v3.3.0/docs/user-guide/helm.md"
  ],
  "rank": 0.96023,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-20261016",
    "verdict_id": "wave1b-20261016:wave1b-20261016-bf9094f35e522faa-38:gate",
    "evidence_hash": "ef816128e607c5aa9302fae9b909454ea8f407319bcb9e2f7cabb87a48bfb40c"
  },
  "review": {
    "draft_hash": "32881b6582f7362bd322640897365fe624b5b9f0f1733f4856258ac84937b2d4",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-20261016:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.73 (>= 0.6 needed)."
  }
}
