Update helm RBAC to account for pvc failure on 0.35.0#1836
Update helm RBAC to account for pvc failure on 0.35.0#1836cayla wants to merge 3 commits intokubernetes-sigs:masterfrom
Conversation
I noticed in v0.35. ``` E0219 23:53:57.761596 1 reflector.go:204] "Failed to watch" err="failed to list *v1.PersistentVolumeClaim: persistentvolumeclaims is forbidden: User \"system:serviceaccount:kube-system:descheduler\" cannot list resource \"persistentvolumeclaims\" in API group \"\" at the cluster scope" logger="UnhandledError" reflector="k8s.io/client-go/informers/factory.go:161" type="*v1.PersistentVolumeClaim" ``` I saw it in rbac.yaml https://github.com/kubernetes-sigs/descheduler/blob/bec9cd38d01eab2d35f1d76b1b9845649e11bffa/kubernetes/base/rbac.yaml#L38-L40 So I figured this just needed a bump
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
|
Hi @cayla. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
There was a problem hiding this comment.
Pull request overview
This PR synchronizes the Helm chart's ClusterRole RBAC permissions with the base Kubernetes YAML configuration by adding missing permissions for PersistentVolumeClaims and the metrics.k8s.io API group. These permissions are required for core descheduler functionality but were previously missing from the Helm chart, causing permission errors like the one described in the PR description.
Changes:
- Added unconditional RBAC permissions for metrics.k8s.io API (nodes and pods resources)
- Added unconditional RBAC permissions for PersistentVolumeClaims
- Bumped Helm chart version from 0.35.0 to 0.35.1
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| charts/descheduler/templates/clusterrole.yaml | Added missing RBAC permissions for metrics.k8s.io API and PersistentVolumeClaims to align with base/rbac.yaml |
| charts/descheduler/Chart.yaml | Bumped chart version from 0.35.0 to 0.35.1 for the bug fix release |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,6 +1,6 @@ | |||
| apiVersion: v1 | |||
| name: descheduler | |||
| version: 0.35.0 | |||
There was a problem hiding this comment.
can this be done in a follow-up OR? this needs to be done after the image is published
There was a problem hiding this comment.
Apologies, my gitops muscle memory
|
/ok-to-test |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - apiGroups: [""] | ||
| resources: ["persistentvolumeclaims"] | ||
| verbs: ["get", "watch", "list"] |
There was a problem hiding this comment.
This chart change adds new RBAC permissions, but Chart.yaml version is still 0.35.0. Helm requires a chart version bump for consumers to pick up template changes (typically bump version patch while keeping appVersion at 0.35.0 if the app didn’t change).
| - apiGroups: [""] | ||
| resources: ["persistentvolumeclaims"] | ||
| verbs: ["get", "watch", "list"] |
There was a problem hiding this comment.
New ClusterRole rule for PersistentVolumeClaims isn’t covered by the existing helm-unittest suites under charts/descheduler/tests. Consider adding a small test that renders templates/clusterrole.yaml and asserts a rule exists for apiGroup "" + resource "persistentvolumeclaims" with list/watch (and/or get) verbs, to prevent regressions.
I noticed in v0.35.
I saw it in rbac.yaml
descheduler/kubernetes/base/rbac.yaml
Lines 38 to 40 in bec9cd3
So I figured this just needed a bump
Description
Checklist
Please ensure your pull request meets the following criteria before submitting
for review, these items will be used by reviewers to assess the quality and
completeness of your changes: