You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
• Document that the operator does not delete orphaned resources after Backstage CR changes.
• Explain the data-loss rationale and user responsibility for manual cleanup.
• Add an oc get example to find operator-managed resources by labels.
High-Level Assessment
The PR’s approach (documenting the no-delete behavior with rationale plus a concrete discovery command) is the most effective and lowest-risk way to set expectations and prevent accidental data loss; no alternative implementation approach is needed for a documentation-only change.
Files changed (1) +19 / -1
Documentation (1) +19 / -1
admin.mdAdd Resource Deletion Policy section (no automatic cleanup)+19/-1
Add Resource Deletion Policy section (no automatic cleanup)
• Adds a new "Resource Deletion Policy" section explaining that the operator intentionally does not delete orphaned resources when the Backstage CR configuration changes. Includes rationale focused on preventing data loss and provides an 'oc get' command to locate operator-created resources via labels for manual cleanup.
The new resource-discovery command (oc get all,pvc,secret ...) does not list ConfigMaps (not
included in all) and also won’t show ServiceMonitors created when monitoring is enabled, so users
may miss operator-created labeled resources during manual cleanup.
ⓘ Recommendations generated based on similar findings in past PRs
Evidence
The doc command currently queries only all,pvc,secret, but the operator creates ConfigMaps and
ServiceMonitors that carry the same app.kubernetes.io/* labels, so those resources won’t be
returned by the documented query.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
### Issue description
`docs/admin.md` instructs users to identify operator-created resources via `oc get all,pvc,secret ...`, but this omits important operator-managed resource types (notably ConfigMaps, and ServiceMonitors when monitoring is enabled). This makes the documented cleanup workflow incomplete.
### Issue Context
The operator applies `app.kubernetes.io/name=backstage` and `app.kubernetes.io/instance=<cr-name>` labels broadly to runtime objects, and it does create ConfigMaps and can create ServiceMonitors.
### Fix Focus Areas
- docs/admin.md[165-172]
### Suggested change
Update the example to include ConfigMaps, and either:
1) include a separate `oc get servicemonitors ...` line (so clusters without the CRD don’t error), or
2) add a short note that monitoring CRs (ServiceMonitor) must be queried explicitly when monitoring is enabled.
For example:
```bash
oc get all,cm,pvc,secret -l app.kubernetes.io/name=backstage,app.kubernetes.io/instance=<cr-name> -n <namespace>
# If monitoring is enabled and the CRD exists:
oc get servicemonitors -l app.kubernetes.io/name=backstage,app.kubernetes.io/instance=<cr-name> -n <namespace>
```
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
2. Missing EOF newline 🐞 Bug⚙ Maintainability
Description
docs/admin.md still has no trailing newline at end-of-file (git reports this in the diff), which is
a minor repo-hygiene issue and can create noisy diffs or fail strict formatting checks.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
### Issue description
`docs/admin.md` ends without a trailing newline.
### Issue Context
The PR edits the end of this file; adding a final newline removes the `No newline at end of file` condition.
### Fix Focus Areas
- docs/admin.md[173-173]
### Suggested change
Ensure there is a newline after the last line (add a final blank line at EOF).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
add doc about operator no-delete policy
Which issue(s) does this PR fix or relate to
https://redhat.atlassian.net/browse/RHIDP-13670
PR acceptance criteria
How to test changes / Special notes to the reviewer
Building Container Images for Testing
Need to test container images from this PR?
For Maintainers: To trigger a test image build, review the code and comment
/build-images.This always builds the HEAD of the PR branch.
For Contributors: Ask a maintainer to run
/build-images.Images will be built and pushed to Quay with links posted in comments.