Skip to content

Non-cascading deletion triggers delete hooks (Pre-Delete and Post-Delete) #27278

@Ben-tal

Description

@Ben-tal

Describe the bug
When deleting an Application with cascade=false, the ArgoCD application still has the pre-delete and post-delete hook finalizers, meaning the controller will continue running hook-managed deletes that can affect the application.
Non-cascade should not touch application resources, but hooks may still trigger an unexpected change to resources.

For example, when I installed the Rancher chart and deleted the application with the non-cascade option, the post-hooks ran and deleted the initial password secret...

To Reproduce

  1. Create an Application that creates resources with Helm or ArgoCD post-delete/pre-delete hooks (For this example i'll use helm-hooks-demo repo )
  2. Delete the app with non-cascading deletion:
argocd app delete helm-hooks-demo --cascade=false --yes
  1. The Application does not delete immediately, and the delete hooks still run, even though --cascade=false was used.

Example manifest:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: helm-hooks-demo
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/dsharma24101992/helmHooksDemo.git
    targetRevision: HEAD
    path: deployments/helm-hooks-demo
  destination:
    server: https://kubernetes.default.svc
    namespace: helm-hooks-demo
  syncPolicy:
    automated: {}
    syncOptions:
    - CreateNamespace=true

Expected behavior

--cascade=false deletes only the Application CR and does not run pre-delete/post-delete hooks.

Version

argocd: v3.1.11+cc053b2
  BuildDate: 2026-01-13T12:15:26Z
  GitCommit: cc053b2eebed744df8c33b33fbbadcd0adcd044d
  GitTreeState: clean
  GoVersion: go1.25.5
  Compiler: gc
  Platform: linux/amd64
argocd-server: v3.1.11+cc053b2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage/pendingThis issue needs further triage to be correctly classified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions