chore: remove unused kubewarden-controller-metrics-reader ClusterRole#1541
chore: remove unused kubewarden-controller-metrics-reader ClusterRole#1541nicknikolakakis wants to merge 1 commit intokubewarden:mainfrom
Conversation
The kubewarden-controller-metrics-reader ClusterRole is a kubebuilder scaffold leftover from the kube-rbac-proxy pattern. It is unused because: - No ClusterRoleBinding references it anywhere in the kubewarden ecosystem - kube-rbac-proxy is not deployed by the Helm chart - Metrics are exposed directly by the controller on port 8088, and via the OpenTelemetry Collector sidecar on port 8080 - Prometheus scrapes metrics via plain HTTP ServiceMonitors without RBAC-based authentication This removes the ClusterRole from the Helm chart template, deletes the corresponding kubebuilder scaffold file, and updates the kustomization reference. Fixes kubewarden#1532 Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1541 +/- ##
==========================================
- Coverage 80.03% 79.96% -0.08%
==========================================
Files 127 127
Lines 16570 16570
==========================================
- Hits 13262 13250 -12
- Misses 3308 3320 +12
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:
|
There was a problem hiding this comment.
Pull request overview
Removes an unused kubebuilder-scaffold RBAC artifact (kubewarden-controller-metrics-reader) related to the disabled kube-rbac-proxy pattern, reducing Helm/chart and kustomize RBAC noise.
Changes:
- Removed the
kubewarden-controller-metrics-readerClusterRole from the Helm chart RBAC template. - Deleted the unused scaffold RBAC manifest
config/rbac/auth_proxy_client_clusterrole.yaml. - Cleaned up
config/rbac/kustomization.yamlby removing the stale commented reference and updating the comment.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
config/rbac/kustomization.yaml |
Removes stale commented-out reference to a deleted auth-proxy RBAC manifest. |
config/rbac/auth_proxy_client_clusterrole.yaml |
Deletes unused scaffold ClusterRole manifest (metrics-reader). |
charts/kubewarden-controller/templates/rbac.yaml |
Drops the unused kubewarden-controller-metrics-reader ClusterRole from Helm RBAC output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jvanz
left a comment
There was a problem hiding this comment.
LGTM. I think we can merge this. Furthermore, if this causes issues, we should get errors from CI as well.
|
Considering that we are reorganizing the RBAC files under the charts directory on #1520 I'm closing this PR and removing the role from that PR. Thanks @nicknikolakakis for the investigation! |
Removes the kubewarden-controller-metrics-reader role from the Helm charts. This role is not used in the Kubewarden stack and we can remove it. Thanks for the investigation done by @nicknikolakakis at kubewarden#1541 Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com> Helped-by: Nick Nikolakakis <nonicked@protonmail.com>
Removes the kubewarden-controller-metrics-reader role from the Helm charts. This role is not used in the Kubewarden stack and we can remove it. Thanks for the investigation done by @nicknikolakakis at kubewarden#1541 Helped-by: Nick Nikolakakis <nonicked@protonmail.com> Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
Removes the kubewarden-controller-metrics-reader role from the Helm charts. This role is not used in the Kubewarden stack and we can remove it. Thanks for the investigation done by @nicknikolakakis at kubewarden#1541 Helped-by: Nick Nikolakakis <nonicked@protonmail.com> Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
Removes the kubewarden-controller-metrics-reader role from the Helm charts. This role is not used in the Kubewarden stack and we can remove it. Thanks for the investigation done by @nicknikolakakis at kubewarden#1541 Helped-by: Nick Nikolakakis <nonicked@protonmail.com> Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
Summary
Removes the unused
kubewarden-controller-metrics-readerClusterRole, which is a kubebuilder scaffold leftover from thekube-rbac-proxypattern.Investigation findings
kubewarden-controller-metrics-readeranywhere in the kubewarden ecosystemkube-rbac-proxyis not deployed by the Helm chart - the deployment template contains no proxy sidecar container8088(cmd/controller/main.go:97), and optionally via the OpenTelemetry Collector sidecar on port80808080/metricswithout RBAC-based authenticationconfig/rbac/scaffold files forkube-rbac-proxyare all commented out inkustomization.yaml, confirming the pattern was intentionally disabledChanges
kubewarden-controller-metrics-readerClusterRole fromcharts/kubewarden-controller/templates/rbac.yamlconfig/rbac/auth_proxy_client_clusterrole.yamlconfig/rbac/kustomization.yamlto remove the stale commented-out referenceNote
The
kubewarden-controller-proxy-roleClusterRole (fortokenreviews/subjectaccessreviews) and its binding also appear to be leftovers from the samekube-rbac-proxypattern since the proxy is not deployed. This could be addressed in a follow-up if desired.Fixes #1532