[OCP 5] Add networking permission on csv#842
Open
desmax74 wants to merge 2 commits into
Open
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the RHTPA operator bundle to a new operator/image version, adds Kubernetes NetworkPolicy RBAC permissions, and refreshes associated scorecard and metrics metadata tooling versions. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The new networking.k8s.io RBAC rules grant create/delete/update on NetworkPolicies; consider tightening these permissions to only the verbs actually needed and aligning their scope with the operator’s reconciliation pattern to preserve least-privilege.
- The PR title contains a typo (“netweorking”); updating it for clarity will make the change history easier to scan later.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new networking.k8s.io RBAC rules grant create/delete/update on NetworkPolicies; consider tightening these permissions to only the verbs actually needed and aligning their scope with the operator’s reconciliation pattern to preserve least-privilege.
- The PR title contains a typo (“netweorking”); updating it for clarity will make the change history easier to scan later.
## Individual Comments
### Comment 1
<location path="bundle/manifests/rhtpa-operator.clusterserviceversion.yaml" line_range="307-314" />
<code_context>
- list
- watch
- delete
+ - apiGroups:
+ - networking.k8s.io
+ resources:
+ - networkpolicies
+ verbs:
+ - create
+ - delete
+ - update
- apiGroups:
- batch
</code_context>
<issue_to_address>
**issue (bug_risk):** NetworkPolicy RBAC is missing read verbs, which may break typical controller reconcile flows
This rule for `networking.k8s.io` / `networkpolicies` only allows `create`, `delete`, and `update`. If the controller calls `Get`/`List`/`Watch` on NetworkPolicies, these requests will be denied and reconciles will fail. Please either add at least `get` (and likely `list`/`watch`) to this RBAC, or adjust the controller so it never reads NetworkPolicies if write-only access is intended.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Signed-off-by: desmax74 <mdessi@redhat.com>
desmax74
force-pushed
the
network_policy_rbac_for_operands
branch
from
June 8, 2026 10:39
9a7e9b3 to
6692990
Compare
|
@desmax74 - This PR has some conflicts that need to be resolved. |
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.
Summary by Sourcery
Update RHTPA operator bundle to a newer release with additional networking permissions and refreshed testing metadata.
New Features:
Enhancements:
Build:
Tests: