Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.35 KB

app_deletion.md

File metadata and controls

53 lines (35 loc) · 1.35 KB

App Deletion

Apps can be deleted with or without a cascade option. A cascade delete, deletes both the app and its resources, rather than only the app.

Deletion Using argocd

To perform a non-cascade delete:

argocd app delete APPNAME --cascade=false

To perform a cascade delete:

argocd app delete APPNAME --cascade

or

argocd app delete APPNAME

Deletion Using kubectl

To perform a non-cascade delete, make sure the finalizer is unset and then delete the app:

kubectl patch app APPNAME  -p '{"metadata": {"finalizers": null}}' --type merge
kubectl delete app APPNAME

To perform a cascade delete set the finalizer, e.g. using kubectl patch:

kubectl patch app APPNAME  -p '{"metadata": {"finalizers": ["resources-finalizer.argocd.argoproj.io"]}}' --type merge
kubectl delete app APPNAME

About The Deletion Finalizer

metadata:
  finalizers:
    - resources-finalizer.argocd.argoproj.io

When deleting an Application with this finalizer, the Argo CD application controller will perform a cascading delete of the Application's resources.

Adding the finalizer enables cascading deletes when implementing the App of Apps pattern.

When you invoke argocd app delete with --cascade, the finalizer is added automatically.