🐛 add create verb to boxcutter preflight#2587
🐛 add create verb to boxcutter preflight#2587kuiwang02 wants to merge 1 commit intooperator-framework:mainfrom
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR fixes Boxcutter applier preflight RBAC validation so it correctly checks for namespace-scoped CREATE permissions, preventing installs from passing preflight but failing later when creating namespaced resources (e.g., ServiceAccounts).
Changes:
- Configure Boxcutter’s
RBACPreAuthorizerwithWithNamespacedCollectionVerbs("create")under thePreflightPermissionsfeature gate.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/cc @perdasilva |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2587 +/- ##
==========================================
+ Coverage 65.84% 67.79% +1.95%
==========================================
Files 137 137
Lines 9560 9577 +17
==========================================
+ Hits 6295 6493 +198
+ Misses 2795 2585 -210
- Partials 470 499 +29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pedjak
left a comment
There was a problem hiding this comment.
please add e2e tests that assert the change.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fgiudici The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
@fgiudici Thanks! |
@pedjak I add e2e cases for the change and it passes. could you please review it again? Thanks |
Summary
Fixes Boxcutter applier's preflight permission check to properly validate namespace-scoped CREATE permissions.
Problem
After PR #2539, the Boxcutter applier's RBACPreAuthorizer was missing the
WithNamespacedCollectionVerbs("create")configuration. This caused the preflight check to pass without validating CREATE permissions, leading to installation failures when the applier attempted to create resources like ServiceAccounts.The Helm applier was correctly configured with this option (line 746), but the Boxcutter applier configuration (line 620) was missing it.
Changes
WithNamespacedCollectionVerbs("create")to Boxcutter's RBACPreAuthorizer instantiation inboxcutterReconcilerConfigurator.Configure()Note: Boxcutter does not need
WithClusterCollectionVerbs("list", "watch")because it doesn't use the contentmanager component, unlike the Helm applier.Related Issues
Assisted-By: Claude Code