Make cascade deletion optional#594
Conversation
|
Hi @sector2000. Thanks for your PR. I'm waiting for a validatedpatterns member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
a13db3c to
c088027
Compare
c088027 to
856248f
Compare
|
/ok-to-test |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: darkdoc, sector2000 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/ok-to-test |
|
/lgtm |
a4d6405
into
validatedpatterns:main
Currently, when the
PatternCR is being deleted, the operator performs a cascade deletion of all ArgoCDApplicationsand their content (overriding the apps pruning configuration), and allManagedClustersresources, eventually removing the entireHubandManagedClusterscustom configurations, and detaching (and potentially deleting) all Openshift managed clusters.This is a very dangerous behaviour.
For this reason this PR makes this behaviour configurable via the
gitops.enableCascadeDeletionparameter in thepatterns-operator-configConfigMap. For a safe and conservative approach, the parameter defaults tofalse. If the user wants to actually perform cascade deletion, he can just set the parameter totruebefore deleting thePatterninstance.