From c6f03eb42e23761b8bbd90ac5a08c408807cdc9e Mon Sep 17 00:00:00 2001 From: Alexandra Molnar Date: Tue, 14 Jan 2025 14:44:43 +0000 Subject: [PATCH] OCPBUGS-39252: Add step to change Argo CD default deletion behaviour --- ...ztp-preparing-the-hub-cluster-for-ztp.adoc | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/modules/ztp-preparing-the-hub-cluster-for-ztp.adoc b/modules/ztp-preparing-the-hub-cluster-for-ztp.adoc index 4ced482d7e9d..0eaf6082f95c 100644 --- a/modules/ztp-preparing-the-hub-cluster-for-ztp.adoc +++ b/modules/ztp-preparing-the-hub-cluster-for-ztp.adoc @@ -41,3 +41,38 @@ You can configure the hub cluster with a set of ArgoCD applications that generat [start=2] include::snippets/ztp-patch-argocd-hub-cluster.adoc[] + + +. Optional: If you have existing ArgoCD applications, verify that the `PrunePropagationPolicy=background` policy is set in the `Application` resource by running the following command: ++ +-- +[source,terminal] +---- +$ oc -n openshift-gitops get applications.argoproj.io \ +clusters -o jsonpath='{.spec.syncPolicy.syncOptions}' |jq +---- + +.Example output for an existing policy +[source,terminal] +---- +[ + "CreateNamespace=true", + "PrunePropagationPolicy=background", + "RespectIgnoreDifferences=true" +] +---- +-- + +.. If the `spec.syncPolicy.syncOption` field does not contain a `PrunePropagationPolicy` parameter or `PrunePropagationPolicy` is set to the `foreground` value, set the policy to `background` in the `Application` resource. See the following example: ++ +[source,yaml] +---- +kind: Application +spec: + syncPolicy: + syncOptions: + - PrunePropagationPolicy=background +---- + ++ +Setting the `background` deletion policy ensures that the `ManagedCluster` CR and all its associated resources are deleted. \ No newline at end of file