Commit 9aab6c0
committed
update pattern deletion logic
this commit includes two key changes:
1. A sync with prune is triggered to remove all applications part of the
pattern BEFORE the subscriptions and other resources are deleted to
prevent applications from becoming undeleteable if CRs, webhooks, etc
disappear.
2. Subscription for openshift-gitops is no longer owned by pattern instances.
Previously, deleting a pattern would delete this subscription and a new
subscription would not be able to be created on the reinstall of a pattern
since the CSV still existed. The subscription is necessary since it sets the
env var ARGOCD_CLUSTER_CONFIG_NAMESPACES to '*'. Without the subscription
the ArgoCD instance created by the new pattern would be created in namespaced
mode and many charts like vault will not install since they try to create
clusterwide resources like clusterrolebindings1 parent 71fc5e1 commit 9aab6c0
File tree
3 files changed
+23
-4
lines changed- internal/controller
3 files changed
+23
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | 165 | | |
168 | 166 | | |
169 | 167 | | |
170 | 168 | | |
171 | | - | |
| 169 | + | |
172 | 170 | | |
173 | 171 | | |
174 | 172 | | |
| |||
528 | 526 | | |
529 | 527 | | |
530 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
531 | 533 | | |
532 | 534 | | |
533 | 535 | | |
| |||
604 | 606 | | |
605 | 607 | | |
606 | 608 | | |
607 | | - | |
| 609 | + | |
| 610 | + | |
608 | 611 | | |
609 | 612 | | |
610 | 613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
0 commit comments