From e48496cd4af24687967f9ba307b45fc4c64cf6fc Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Tue, 20 Jun 2023 21:29:33 -0400 Subject: [PATCH] docs: Add documentation on background cascading deletion (#12229) (#14149) Signed-off-by: toyamagu2021@gmail.com Co-authored-by: toyamagu <83329336+toyamagu-2021@users.noreply.github.com> --- docs/operator-manual/application.yaml | 3 +++ docs/user-guide/app_deletion.md | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/docs/operator-manual/application.yaml b/docs/operator-manual/application.yaml index 299da7eba4b95..b9c033432d623 100644 --- a/docs/operator-manual/application.yaml +++ b/docs/operator-manual/application.yaml @@ -6,7 +6,10 @@ metadata: namespace: argocd # Add this finalizer ONLY if you want these to cascade delete. finalizers: + # The default behaviour is foreground cascading deletion - resources-finalizer.argocd.argoproj.io + # Alternatively, you can use background cascading deletion + # - resources-finalizer.argocd.argoproj.io/background # Add labels to your application object. labels: name: guestbook diff --git a/docs/user-guide/app_deletion.md b/docs/user-guide/app_deletion.md index fdf16d17aa03a..65a17e7eb53ff 100644 --- a/docs/user-guide/app_deletion.md +++ b/docs/user-guide/app_deletion.md @@ -43,11 +43,18 @@ kubectl delete app APPNAME ```yaml metadata: finalizers: + # The default behaviour is foreground cascading deletion - resources-finalizer.argocd.argoproj.io + # Alternatively, you can use background cascading deletion + # - resources-finalizer.argocd.argoproj.io/background ``` 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](../operator-manual/cluster-bootstrapping.md#cascading-deletion). +The default propagation policy for cascading deletion is [foreground cascading deletion](https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion). +ArgoCD performs [background cascading deletion](https://kubernetes.io/docs/concepts/architecture/garbage-collection/#background-deletion) when `resources-finalizer.argocd.argoproj.io/background` is set. + When you invoke `argocd app delete` with `--cascade`, the finalizer is added automatically. +You can set the propagation policy with `--propagation-policy `.