-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Read custom resource metrics configuration from a Custom Resource Definition #1948
Comments
/assign @mrueg |
When I originally saw the custom resource metrics configuration YAML, I thought it was a CRD 😄. Glad to see this proposal; it would be a great solution for our current problem. We maintain multiple components using CRDs across multiple platforms, which each deploy their own KSM instance. We would like to define the metrics gathering configurations alongside the component CRDs so that they can be included in all platforms that use the component and maintained easily. In the current situation, we would have to come up with some mechanism to merge the configs from each component into a single config, either at build time or using a sidecar in the KSM pod. This would be so much better! Thanks for the suggestion! |
Heyho, is implementing a CRD a done decision? Nothing against that, I was just thinking that maybe loading configmaps like grafana does might be easier? 🤔 |
From the user side, CRDs are much easier to use than configmaps for structured APIs and the standard thing to do in Kubernetes.
|
I see many people are interested to configure metrics for CRDs via a CRD. I think it will take several months until kube-state-metrics will be able to handle this. Maybe there is already an alternative solution (without kube-state-metrics)? If you know an alternative CRD based solution, please leave a comment here. |
For folks which are interested: I've got a working poc implementation which dynamically reads configurations from configmaps which uses the It also uses So for new metrics I would deploy a
|
Cleaned up to a new branch in CAPI: kubernetes-sigs/cluster-api#9390 |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
This will likely be covered as part of kubernetes/enhancements#4785. |
What would you like to be added:
As of today, kube-state-metrics allows to define a configuration file which is read on startup to define metrics for custom resources via configuration.
Instead of using a configuration file to define custom metrics, kube-state-metrics could define its own Custom Resource Definition, which defines the metric configuration for a single Custom Resource instead.
Why is this needed:
Custom Resource Definitions can be deployed dynamically. The same could apply to the configuration of metrics for the same.
There are also had been several comments and discussions which now results in this issue (see additional context below).
Describe the solution you'd like
UX:
foo
foo
Additional context
Different issue which mentions this idea: Prevent definition of same gvk in custom resource configuration #1810 (comment)
There also had been some slack discussions which mentioned this idea.
The pattern would be similar to what the
ServiceMonitor
CRD is for the Prometheus operator.The text was updated successfully, but these errors were encountered: