Restrict VTEP write RBAC to status/finalizers subresources#2956
Restrict VTEP write RBAC to status/finalizers subresources#2956kyrtapz wants to merge 1 commit intoopenshift:masterfrom
Conversation
Signed-off-by: Patryk Diak <pdiak@redhat.com>
WalkthroughRBAC permissions for OVN virtual tunnel endpoints (vteps) were reorganized in the control plane ClusterRole. Verbs Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kyrtapz, tssurya 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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
bindata/network/ovn-kubernetes/common/004-rbac-control-plane.yaml (1)
268-276:⚠️ Potential issue | 🟠 MajorAdd
finalizerssubresource declaration to the vteps CRD.The RBAC rule grants
patch/updateonvteps/finalizers, but the vteps CRD (line 5391 in001-crd.yaml) only declaressubresources.status: {}without declaring thefinalizerssubresource. This mismatch means the finalizers RBAC grant will not be effective. Addfinalizers: {}to the subresources section:subresources: status: {} finalizers: {}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@bindata/network/ovn-kubernetes/common/004-rbac-control-plane.yaml` around lines 268 - 276, The RBAC grants patch/update on the vteps/finalizers subresource but the vteps CRD only declares subresources.status, so add the missing finalizers subresource to the vteps CRD: locate the vteps CustomResourceDefinition (the CRD that currently contains subresources.status: {}) and update its subresources block to include finalizers: {} alongside status so the vteps/finalizers RBAC rule becomes effective.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@bindata/network/ovn-kubernetes/common/004-rbac-control-plane.yaml`:
- Around line 268-276: The RBAC grants patch/update on the vteps/finalizers
subresource but the vteps CRD only declares subresources.status, so add the
missing finalizers subresource to the vteps CRD: locate the vteps
CustomResourceDefinition (the CRD that currently contains subresources.status:
{}) and update its subresources block to include finalizers: {} alongside status
so the vteps/finalizers RBAC rule becomes effective.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 26934d51-d619-4d0e-a7aa-8a5e6a862e2d
📒 Files selected for processing (1)
bindata/network/ovn-kubernetes/common/004-rbac-control-plane.yaml
|
/hold |
|
@kyrtapz: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
@coderabbitai: are you sure about your comment? see kubernetes/enhancements#3286 |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 0 🏁 Script executed: Length of output: 0 🏁 Script executed: Length of output: 875 🏁 Script executed: Length of output: 3784 🏁 Script executed: Length of output: 1486 🏁 Script executed: Length of output: 67
KEP-3285 ("Subresource finalizers", stable since v1.28) introduced The RBAC grant on
|
|
|
No description provided.