Skip to content

Commit 256e073

Browse files
authored
Merge pull request #86992 from amolnar-rh/OCPBUGS-39252
OCPBUGS-39252: Add step to change Argo CD default deletion behaviour
2 parents a80605e + 3c8082a commit 256e073

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

modules/ztp-preparing-the-hub-cluster-for-ztp.adoc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,38 @@ You can configure the hub cluster with a set of ArgoCD applications that generat
4141
4242
[start=2]
4343
include::snippets/ztp-patch-argocd-hub-cluster.adoc[]
44+
45+
46+
. Optional: If you have existing ArgoCD applications, verify that the `PrunePropagationPolicy=background` policy is set in the `Application` resource by running the following command:
47+
+
48+
--
49+
[source,terminal]
50+
----
51+
$ oc -n openshift-gitops get applications.argoproj.io \
52+
clusters -o jsonpath='{.spec.syncPolicy.syncOptions}' |jq
53+
----
54+
55+
.Example output for an existing policy
56+
[source,terminal]
57+
----
58+
[
59+
"CreateNamespace=true",
60+
"PrunePropagationPolicy=background",
61+
"RespectIgnoreDifferences=true"
62+
]
63+
----
64+
--
65+
66+
.. 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:
67+
+
68+
[source,yaml]
69+
----
70+
kind: Application
71+
spec:
72+
syncPolicy:
73+
syncOptions:
74+
- PrunePropagationPolicy=background
75+
----
76+
77+
+
78+
Setting the `background` deletion policy ensures that the `ManagedCluster` CR and all its associated resources are deleted.

0 commit comments

Comments
 (0)