OCPBUGS-83751: add missing RBAC for webhook configurations - #8276
Conversation
The webhookcerts controller introduced in PR openshift#8174 (CNTRLPLANE-2207) performs Get/Update on MutatingWebhookConfiguration and ValidatingWebhookConfiguration via the cached client, which triggers lazy informer creation requiring list/watch at cluster scope. The ClusterRole was missing these permissions, causing repeated reflector errors in the operator logs. Add a cluster-scoped RBAC rule for mutatingwebhookconfigurations and validatingwebhookconfigurations with get, list, watch, and update verbs. Closes: OCPBUGS-83751 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
📝 WalkthroughWalkthroughThe pull request adds RBAC (Role-Based Access Control) permissions to the HyperShift operator cluster role. Specifically, it introduces a new policy rule in 🚥 Pre-merge checks | ✅ 8 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (8 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@jparrill: This pull request references Jira Issue OCPBUGS-83751, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jparrill 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 |
|
@jparrill: This pull request references Jira Issue OCPBUGS-83751, which is valid. 3 validation(s) were run on this bug
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 openshift-eng/jira-lifecycle-plugin repository. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8276 +/- ##
==========================================
+ Coverage 35.62% 35.93% +0.31%
==========================================
Files 767 767
Lines 93333 93338 +5
==========================================
+ Hits 33248 33543 +295
+ Misses 57396 57103 -293
- Partials 2689 2692 +3
🚀 New features to boost your workflow:
|
|
/lgtm |
|
Scheduling tests matching the |
|
/test e2e-aws |
AI Test Failure AnalysisJob: Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6 |
|
/cherry-pick release-4.22 |
AI Test Failure AnalysisJob: Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6 |
|
@celebdor: once the present PR merges, I will cherry-pick it on top of 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. |
Test Resultse2e-aks
e2e-aws
|
|
/verified by e2e artifacts Looking at one random e2e test, we can see the issue is not happening anymore: |
|
@jparrill: This PR has been marked as verified by 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 openshift-eng/jira-lifecycle-plugin repository. |
AI Test Failure AnalysisJob: Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6 |
|
/test e2e-azure-self-managed |
|
/test e2e-aws |
AI Test Failure AnalysisJob: Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6 |
AI Test Failure AnalysisJob: Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6 |
AI Test Failure AnalysisJob: Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6 |
|
I now have all the evidence needed for a complete analysis. Here is the final report: Test Failure Analysis CompleteJob Information
Test Failure AnalysisErrorSummaryAll 19 test failures are caused by the Root CauseThis is a pre-existing flaky test, not a regression caused by PR #8276. The Why PR #8276 cannot cause these failures:
Why these restarts happen:
Recommendations
Evidence
|
|
/hold Revision fc17f23 was retested 3 times: holding |
|
/test e2e-azure-self-managed |
|
/hold cancel |
|
@jparrill: all tests passed! 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. |
|
@jparrill: Jira Issue Verification Checks: Jira Issue OCPBUGS-83751 Jira Issue OCPBUGS-83751 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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 openshift-eng/jira-lifecycle-plugin repository. |
|
@celebdor: new pull request created: #8295 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. |
|
Fix included in release 5.0.0-0.nightly-2026-04-21-191046 |
Summary
mutatingwebhookconfigurationsandvalidatingwebhookconfigurationswithget,list,watch,updateverbs to the hypershift-operatorClusterRolewebhookcertscontroller (PR CNTRLPLANE-2207: feat(install): self-manage webhook certs instead of relying on service-ca #8174, CNTRLPLANE-2207) usesClient.Get()/Client.Update()on these resources via the cached client, which triggers lazy informer creation requiringlist/watchpermissions at cluster scopedeleteruleBug
Closes https://issues.redhat.com/browse/OCPBUGS-83751
Test plan
go test -race ./cmd/install/assets/ -run TestHyperShiftOperatorClusterRole_WebhookRBAC)go build ./cmd/install/...)hypershift installand verify no reflector RBAC errors in operator logs🤖 Generated with Claude Code
Summary by CodeRabbit
Tests
Chores