-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[kube-state-metrics] Support CustomResourceState #3470
[kube-state-metrics] Support CustomResourceState #3470
Conversation
0d9af4f
to
ef3d4d4
Compare
- customresourcedefinitions | ||
verbs: ["list", "watch"] | ||
{{- if $.Values.customResourceState.generateRBAC }} | ||
{{- range $.Values.customResourceState.config.spec.resources }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This unfortunately does not work as expected as the clusterrole expects a resource and not a kind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrueg Do you have a config example and the expected output here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/mrueg/customresourcestate-configs you can check with one of them.
We'll also look upstream into changing the interface to make this easier.
kubernetes/kube-state-metrics#2093
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think generating a configmap with all the resources and mounting it like in @QuentinBisson example will work, even with a flat include of all the resources under config:
.
This solution doesn't require a breaking change in kube-state-metrics, but you can still decide to it if you think the format needs to move forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for right now, I would drop it and point to .Values.rbac.extraRules
This is what we use internally, maybe this can be of help https://github.com/giantswarm/cluster-api-monitoring-app/tree/main/helm/cluster-api-monitoring/templates |
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
ef3d4d4
to
716b8b9
Compare
…y#3470) Signed-off-by: Manuel Rüger <manuel@rueg.eu>
What this PR does / why we need it
This adds support to supply a CustomResourceState configuration to kube-state-metrics.
Which issue this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged)Special notes for your reviewer
Checklist
[prometheus-couchdb-exporter]
)