Skip to content

[kube-state-metrics] fix: allow disabling cluster-wide CRD RBAC#6742

Open
Nirpesh551 wants to merge 1 commit intoprometheus-community:mainfrom
Nirpesh551:fix/ksm-crd-rbac
Open

[kube-state-metrics] fix: allow disabling cluster-wide CRD RBAC#6742
Nirpesh551 wants to merge 1 commit intoprometheus-community:mainfrom
Nirpesh551:fix/ksm-crd-rbac

Conversation

@Nirpesh551
Copy link
Copy Markdown

What this PR does / why we need it

Fixes an issue where kube-state-metrics forcefully requires cluster-wide customresourcedefinitions list/watch privileges when customResourceState.enabled is true. This prevents deployment for users who only have namespace-level privileges.

This PR adds a new values flag rbac.customResourceState.createClusterRoleRules (defaulting to true for backwards compatibility) that allows users to opt out of the cluster-wide CRD RBAC rules while still using custom resource state metrics.

Which issue this PR fixes

fixes #6708

Special notes for your reviewer

Hi! This is my first open-source contribution. Let me know if anything needs adjusting!

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

Signed-off-by: Nirpesh551 <nirpeshbhattarai551@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[kube-state-metrics] BUG: not possible to use customResourceState without cluster-scope privileges.

1 participant