fix: Fix cluster-autoscaler missing resource.k8s.io RBAC permissions#214
Merged
fix: Fix cluster-autoscaler missing resource.k8s.io RBAC permissions#214
Conversation
…e patch Agent-Logs-Url: https://github.com/magenx/kuberaptor/sessions/77b0157c-b97f-4cba-b72e-af693e526794 Co-authored-by: magenx <1591200+magenx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/magenx/kuberaptor/sessions/77b0157c-b97f-4cba-b72e-af693e526794 Co-authored-by: magenx <1591200+magenx@users.noreply.github.com>
This was referenced May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cluster-autoscaler (client-go v0.35.0 / Kubernetes 1.32+) watches Dynamic Resource Allocation (DRA) resources —
resourceclaims,resourceslices,deviceclasses— in theresource.k8s.ioAPI group. ThepatchClusterRolefunction only patchedstorage.k8s.io, leaving these verbs unauthorized and flooding logs with reflector errors.Changes
patchClusterRolerefactor — rewrites the single-group loop into a multi-group scan that tracksstorage.k8s.ioandresource.k8s.ioseparately, then appends any missing rules after the scanresource.k8s.iorule injection — addsget/list/watchonresourceclaims,resourceslices,deviceclasseswhen the rule is absentstorage.k8s.iofallback — also inserts astorage.k8s.io/volumeattachmentsrule when no storage rule exists at all (previously silently skipped)TestPatchClusterRole— three sub-tests: missing rule is added, existing rule is not duplicated,volumeattachmentsis patched into an existing storage rule