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
Resource Metrics for CRDs #1210
Comments
Looks like this PR would need to be revived: #515 I agree that it would be a great addition to kube-state-metrics. I am also wondering if we should take out VPA metrics and have them be monitored as CRDs. VPAs aren't considered as k8s primitive APIs. /help |
@tariq1890: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions 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/test-infra repository. |
Is anyone currently working on this? I would be interested in implementing this feature. |
Hey @dgrisonnet there is no real plan on the roadmap for this. I would prefer native instrumentation for CRs, while I understand its not always possible, but have my doubts on CR instance metrics being added in kube-state-metrics. In any case I would prefer to wait for release-2.0 to be out before we do this. |
I completely agree with you that CR should not be monitored by kube-state-metrics. However, in my opinion, Custom Resource Definition should be as it is a native Kubernetes resource.
Sure, no worries. I wasn't intending to put pressure on getting this feature in 2.0. |
No pressure at all! :) Seems interesting. @mrueg @dgrisonnet what value does this bring to you, can you describe some use cases how you would use those metrics in queries, alerts or dashboards, etc.? Thanks! We like to get some use cases so we don't just add things for the sake of adding them but folks don't use it and its just extra series that are produced, hope that makes sense. |
@lilic Another use case are cert-manager's CRDs where one could use the crd metrics to verify that the actual secrets including the certificate and key get created. |
Not sure how |
The prometheus operator already exposes metrics about it's CRs itself, which is how I believe it should be. Certmanager should do the same. |
Apologies, should have read more closely. yes I was thinking about instance level metrics. The generic ones could be interesting to provide info when a CRD was updated (unless the tools using them already provide that info) |
Not sure we would do instance level metrics at this points for custom resources, but if you come up with a mini proposal on the pros and cons we can have a look, google doc is fine or just more detailed description in a new issue as I would like to keep this one for CRD metrics. Thanks! |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale I believe this is still valid. @mrueg do you want me to label this as help wanted or do you want to tackle the proposal part yourself? Thanks! |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Was it implemented ? If not - upvoting ;) |
Maybe my use-case - I have dashboards showing information about resources related to one of the operators - ConfigMap, Secrets and its leaks information about CR's |
@grzesuav this was not implemented, it's up for grabs if you are interested in tackling it? |
hi @lilic , I can try, I am not familiar with the project though, will try to look at it next weekend and ask more question about feasibility of implementation if that's ok |
just one thing @lilic , as I noticed |
Yes that sounds great! 👍 |
hi, I have question related to implementation, I have some easy draft here - #1517. The challenge I currently have is that typed client for type func(kubeClient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset".Interface, ns string) "k8s.io/client-go/tools/cache".ListerWatcher) than func(kubeClient "k8s.io/client-go/kubernetes".Interface, ns string) "k8s.io/client-go/tools/cache".ListerWatcher therefore I have some questions :
additional questions :
That is all what I have, please let me know whad do you think, Cheers |
It looks like @mrueg's feature request was for instance-level (i.e. custom resource) metrics, but the conversation (and in-flight PR) has shifted to focus on custom resource definition metrics. I'm not going to get into technical details, level of effort, etc, but I'd like to give a plus 1 for instance-level metrics. All custom resources have the same metadata (i.e. ObjectMeta). I think it'd be incredibly valuable to serve metrics about that metadata for free (or via some opt-in API) |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions 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/test-infra repository. |
Hey, was this implemented? I'm not familiar with the codebase, but I can come up with a proposal if that's something the maintainers want to put forward. I'm interested in instance-level metadata metrics, especially My use case: I maintain a CICD cluster using TektonCD. Tekton controllers manage |
@RafaeLeal yes it was, (not by me) - https://github.com/kubernetes/kube-state-metrics/blob/master/docs/customresourcestate-metrics.md |
@grzesuav reading this I'm not sure if we can implement a kind: CustomResourceStateMetrics
spec:
resources:
- groupVersionKind:
group: myteam.io
kind: "Foo"
version: "v1"
metrics:
- name: "labels"
help: "Foo labels"
each: ???
labelsFromPath:
"*": [metadata, labels] But I don't know exactly what to put on Maybe we should extend the API to allow this? |
/kind feature
With the growing use of CRDs in K8s it might be useful to monitor those as well and provide some initial metrics for them.
Idea:
Have kube-state-metrics read a configuration file that allows the user to list further resources.
A list of crds to monitor:
could create metrics similar to https://github.com/kubernetes/kube-state-metrics/blob/master/docs/configmap-metrics.md
kube_CRD_NAME_info
kube_CRD_NAME_created
kube_CRD_NAME_metadata_resource_version
The text was updated successfully, but these errors were encountered: