Skip to content

Make cascade deletion optional#594

Open
sector2000 wants to merge 6 commits intovalidatedpatterns:mainfrom
sector2000:make-cascade-deletion-optional
Open

Make cascade deletion optional#594
sector2000 wants to merge 6 commits intovalidatedpatterns:mainfrom
sector2000:make-cascade-deletion-optional

Conversation

@sector2000
Copy link
Copy Markdown
Contributor

Currently, when the Pattern CR is being deleted, the operator performs a cascade deletion of all ArgoCD Applications and their content (overriding the apps pruning configuration), and all ManagedClusters resources, eventually removing the entire Hub and ManagedClusters custom 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.enableCascadeDeletion parameter in the patterns-operator-config ConfigMap. For a safe and conservative approach, the parameter defaults to false. If the user wants to actually perform cascade deletion, he can just set the parameter to true before deleting the Pattern instance.

@openshift-ci openshift-ci Bot requested review from mbaldessari and mhjacks April 24, 2026 10:35
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 24, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sector2000
Once this PR has been reviewed and has the lgtm label, please assign mlabonte-rh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 24, 2026

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@sector2000 sector2000 force-pushed the make-cascade-deletion-optional branch from 573dc13 to 46c7756 Compare April 24, 2026 15:59
@sector2000 sector2000 force-pushed the make-cascade-deletion-optional branch from a13db3c to c088027 Compare April 24, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant