do not delete disabled resources#2733
Conversation
There was a problem hiding this comment.
Hmm.., it might be confusing to see that some resources are still there when the corresponding feature is purposely toggled from enabled to disabled. For example, I first create a Backstage CR on OCP (so with a Route created by default), then I set spec.application.route.enabled: false in the CR, and now the Route object is still present.
Maybe the Operator could add some uniquely identifiable labels on the resources it creates and manages, and only try to delete those to avoid conflict with user-created resources?
Or (thinking out loud) maybe just refuse to reconcile if there are conflicting resources that it does not manage, and thus avoid touching those?
Let's just document it for clarity and keep simple until we really need to make it complex. |
This would be kinda breaking change then, I guess. |
As discussed today, let's document this here (and also consider mentioning this in the official product docs). |
|
/cherry-pick release-1.10 |
|
@rm3l: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
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. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2733 +/- ##
==========================================
- Coverage 61.18% 61.05% -0.13%
==========================================
Files 37 37
Lines 2128 2098 -30
==========================================
- Hits 1302 1281 -21
+ Misses 692 683 -9
Partials 134 134
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|



Description
It excludes potential deleting the resources created when certain feature is disabled (such as local db, route, monitor)
Which issue(s) does this PR fix or relate to
https://redhat.atlassian.net/browse/RHDHBUGS-2781
PR acceptance criteria
How to test changes / Special notes to the reviewer
For example: