🌱 Use dedicated least-privilege service accounts for revision probe e2e tests#2547
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
Updates the revision e2e tests to run with dedicated ServiceAccounts and purpose-built RBAC templates rather than relying on the shared “needed permissions” setup.
Changes:
- Added per-scenario RBAC templates for revision probe-related ServiceAccounts.
- Introduced a new Godog step that applies an RBAC template derived from the ServiceAccount name.
- Updated
revision.featureto use the new ServiceAccounts and step.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/e2e/steps/testdata/pvc-probe-sa-rbac-template.yaml | Adds a dedicated RBAC template for the PVC probe failure scenario. |
| test/e2e/steps/testdata/pvc-bound-sa-rbac-template.yaml | Adds a dedicated RBAC template for the PVC “Bound” progression scenario (includes PV permissions). |
| test/e2e/steps/steps.go | Adds a new step to apply <serviceAccount>-rbac-template.yaml RBAC templates. |
| test/e2e/features/revision.feature | Switches scenarios to use the new dedicated ServiceAccounts and RBAC-template step. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/hold |
10047fe to
3a1a7d8
Compare
3a1a7d8 to
4415ed9
Compare
a71cce6 to
4415ed9
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4415ed9 to
1095a15
Compare
|
/unhold |
1095a15 to
0091b38
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… tests The revision probe e2e tests previously shared the generic `olm-sa` service account, which had broad permissions that masked potential RBAC issues. This change: - Refactors RBAC template selection to use a convention-based naming pattern: `<service-account>-<helm|boxcutter>-rbac-template.yaml`, replacing the hardcoded constants with `fmt.Sprintf` - Renames existing RBAC templates with `olm-sa-` prefix to follow the new convention (`rbac-template.yaml` → `olm-sa-helm-rbac-template.yaml`, `boxcutter-rbac-template.yaml` → `olm-sa-boxcutter-rbac-template.yaml`) - Introduces a dedicated `pvc-probe-sa` service account for PVC probe scenarios with a least-privilege RBAC template granting only CER finalizer update, PersistentVolume CRUD, PVC CRUD, and ConfigMap CRUD Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
0091b38 to
5811289
Compare
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tmshort 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 |
|
/lgtm |
|
/override ".github/workflows/pr-title.yaml / Verify PR title (pull_request_target)" |
|
@tmshort: /override requires failed status contexts, check run or a prowjob name to operate on.
Only the following failed contexts/checkruns were expected:
If you are trying to override a checkrun that has a space in it, you must put a double quote on the context. DetailsIn response to this:
Instructions 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. |
|
/override "Verify PR title" |
|
@tmshort: Overrode contexts on behalf of tmshort: Verify PR title DetailsIn response to this:
Instructions 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. |
|
/override "Verify PR title" |
|
@tmshort: /override requires failed status contexts, check run or a prowjob name to operate on.
Only the following failed contexts/checkruns were expected:
If you are trying to override a checkrun that has a space in it, you must put a double quote on the context. DetailsIn response to this:
Instructions 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. |
33a0224
into
operator-framework:main
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2547 +/- ##
==========================================
+ Coverage 64.28% 68.58% +4.29%
==========================================
Files 131 131
Lines 9330 9330
==========================================
+ Hits 5998 6399 +401
+ Misses 2855 2439 -416
- Partials 477 492 +15
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:
|
Description
The revision probe e2e tests are failing the test-experimental-e2e job. This PR addresses that issue.
The revision probe e2e tests previously shared the generic
olm-saservice account, which has RBAC permissions related to the scope required for the test-operator. This change updates the service account + RBAC creation step to derive the appropriate rbac template from the service account and the olm kernel used (helm or boxcutter). It also adds a dedicated rbac template for the revision test with only the rbac required for the tests (i.e. the resources in the revision object).Changes
fmt.Sprintfpattern:<service-account>-<helm|boxcutter>-rbac-template.yaml, keyed off the service account name and theBoxcutterRuntimefeature gateolm-sa-prefix to match the new convention (rbac-template.yaml→olm-sa-helm-rbac-template.yaml,boxcutter-rbac-template.yaml→olm-sa-boxcutter-rbac-template.yaml)pvc-probe-saservice account: PVC revision scenarios now use a dedicated SA with a least-privilege RBAC template granting only CER finalizer update, PersistentVolume CRUD, PVC CRUD, and ConfigMap CRUDReviewer Checklist