Skip to content

fix: add NetworkPolicy RBAC permissions - #1690

Merged
dkwon17 merged 1 commit into
devfile:mainfrom
rohankanojia-forks:fix/add-networkpolicies-rbac
Aug 11, 2026
Merged

fix: add NetworkPolicy RBAC permissions#1690
dkwon17 merged 1 commit into
devfile:mainfrom
rohankanojia-forks:fix/add-networkpolicies-rbac

Conversation

@rohanKanojia

@rohanKanojia rohanKanojia commented Aug 10, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Add kubebuilder RBAC for networking.k8s.io/networkpolicies (create, delete, update, patch, get, list, watch) on the DevWorkspaceRouting controller.

What issues does this PR fix or reference?

Operators are expected to be able to manage NetworkPolicy resources for their operands. The CSV currently only requests networking.k8s.io/ingresses.

Is it tested? How?

  • Marker-only change in this PR; generated RBAC/CSV updates come from make generate_all (include those manifests in this PR or a follow-up commit before merge).
  • Target branch: 0.43.x (also needed on main if not cherry-picked later).

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

Summary by CodeRabbit

  • New Features
    • Added the permissions required to manage Kubernetes NetworkPolicy resources.
    • Enables creating, viewing, updating, deleting, listing, and monitoring network policies for supported workspace deployments.

@openshift-ci

openshift-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f5011725-357b-4ea9-91e7-34f6bd2b10af

📥 Commits

Reviewing files that changed from the base of the PR and between 20ec7ee and ac6c2b2.

📒 Files selected for processing (7)
  • controllers/controller/devworkspacerouting/devworkspacerouting_controller.go
  • deploy/bundle/manifests/devworkspace-operator.clusterserviceversion.yaml
  • deploy/deployment/kubernetes/combined.yaml
  • deploy/deployment/kubernetes/objects/devworkspace-controller-role.ClusterRole.yaml
  • deploy/deployment/openshift/combined.yaml
  • deploy/deployment/openshift/objects/devworkspace-controller-role.ClusterRole.yaml
  • deploy/templates/components/rbac/role.yaml

📝 Walkthrough

Walkthrough

The controller and deployment manifests now grant create, delete, get, list, patch, update, and watch permissions for networkpolicies in the networking.k8s.io API group.

Changes

NetworkPolicy RBAC

Layer / File(s) Summary
Controller RBAC declaration
controllers/controller/devworkspacerouting/devworkspacerouting_controller.go
The controller declares full lifecycle permissions for networkpolicies.
Deployment RBAC propagation
deploy/templates/components/rbac/role.yaml, deploy/deployment/kubernetes/..., deploy/deployment/openshift/..., deploy/bundle/manifests/devworkspace-operator.clusterserviceversion.yaml
The RBAC template and Kubernetes, OpenShift, and bundle manifests grant full lifecycle permissions for networkpolicies.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: dkwon17, tolusha, akurinnoy

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding NetworkPolicy RBAC permissions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rohanKanojia
rohanKanojia force-pushed the fix/add-networkpolicies-rbac branch from 47a5b81 to 0a27c97 Compare August 10, 2026 18:09
@rohanKanojia rohanKanojia changed the title docs: create DWO 0.43.0 changelog fix: add NetworkPolicy RBAC permissions Aug 10, 2026
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@rohanKanojia
rohanKanojia force-pushed the fix/add-networkpolicies-rbac branch from 0a27c97 to ac6c2b2 Compare August 10, 2026 18:23
@rohanKanojia
rohanKanojia marked this pull request as ready for review August 11, 2026 05:35
@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rohanKanojia, tolusha
Once this PR has been reviewed and has the lgtm label, please assign dkwon17 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

@dkwon17
dkwon17 merged commit 2a7ec67 into devfile:main Aug 11, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants