Remove unnecessary RBAC verbs#29
Open
lpiwowar wants to merge 1 commit into
Open
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lpiwowar 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 |
Collaborator
Author
|
/test all |
Applied principle of least privilege across all RBAC markers in openstacklightspeed_controller.go. Verbs were removed where code analysis confirmed they are never exercised by the controller or the controller-runtime framework. ClusterRole changes: - openstacklightspeeds: removed create, delete, update; get, list, watch, patch are sufficient for normal reconciliation - openstacklightspeeds/status: removed get, update; only patch is needed to update the status subresource - clusterroles: removed update, delete; CreateOrPatch uses get/create/patch, bulk removal uses deletecollection (DeleteAllOf) - clusterrolebindings: same reasoning as clusterroles - clusterversions: removed watch only; list is retained because the operator grants list to the app-server SAR ClusterRole and cannot grant permissions it does not hold - consoleplugins: removed update; get/list/watch/create/patch/delete cover all actual operations Role (namespaced) changes: - clusterserviceversions: removed patch; only update and delete are needed for owner reference and uninstall - networkpolicies: removed update; CreateOrPatch uses get/create/patch - deployments: removed update, delete; CreateOrPatch uses get/create/patch; owned resources are GC'd by Kubernetes - configmaps: removed update; get/list/watch/create/patch/delete cover all actual operations (one ConfigMap is explicitly deleted on toggle) - secrets: removed update, delete; bulk removal uses deletecollection (DeleteAllOf); owned secrets are GC'd by Kubernetes - services: removed update, delete; CreateOrPatch uses get/create/patch; owned resources are GC'd by Kubernetes - persistentvolumeclaims: removed update; get/list/watch/create/patch cover all actual operations; PVCs are intentionally never deleted Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lpiwowar
force-pushed
the
lpiwowar/OSPRH-30842
branch
from
July 21, 2026 16:26
3499f12 to
88d1e3a
Compare
Collaborator
Author
|
/test all |
Collaborator
Author
|
/hold I'm waiting for this PR to get merged. I do not want to cause any more merge conflicts -> #19 |
Collaborator
Author
|
/test openstack-lightspeed-kuttl-4-20 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Applied principle of least privilege across all RBAC markers in
openstacklightspeed_controller.go. Verbs were removed where code analysis confirmed they are never exercised by the controller or the controller-runtime framework.ClusterRole changes:
openstacklightspeeds: removedcreate,delete,update; get/list/watch/patch are sufficient for normal reconciliationopenstacklightspeeds/status: removedget,update; onlypatchis needed to update the status subresourceclusterroles: removedupdate,delete; CreateOrPatch uses get/create/patch, bulk removal usesdeletecollection(DeleteAllOf)clusterrolebindings: same reasoning as clusterrolesclusterversions: removedwatchonly;listis retained because the operator grants list to the app-server SAR ClusterRole and cannot grant permissions it does not holdconsoleplugins: removedupdate; get/list/watch/create/patch/delete cover all actual operationsRole (namespaced) changes:
clusterserviceversions: removedpatch; only update and delete are needed for owner reference and uninstallnetworkpolicies: removedupdate; CreateOrPatch uses get/create/patch; owned resources are GC'd by Kubernetesdeployments: removedupdate,delete; CreateOrPatch uses get/create/patch; owned resources are GC'd by Kubernetesconfigmaps: removedupdate; get/list/watch/create/patch/delete cover all actual operations (one ConfigMap is explicitly deleted on toggle)secrets: removedupdate,delete; bulk removal usesdeletecollection(DeleteAllOf); owned secrets are GC'd by Kubernetesservices: removedupdate,delete; CreateOrPatch uses get/create/patch; owned resources are GC'd by Kubernetespersistentvolumeclaims: removedupdate; get/list/watch/create/patch cover all actual operations; PVCs are intentionally never deleted