-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Enhancement]: Monitoring of custom resources #10276
Comments
…state In order to monitor the state of custom resources (CR) inside of the Kubernetes cluster, kube-state-metrics can be deployed. This describes the deployment using the prometheus-community Helm chart. Issue: strimzi#10276 Signed-off-by: Sebastian Gaiser <sebastiangaiser@users.noreply.github.com>
Discussed on the community call on 10.7.2024: Looks good to Jakub & Jakub 😉. But should be discussed on the next call with hopefully more maintainers present. |
Discussed on the community call on 25.07.2024: I will check the installation and how we can get the metrics and we will discuss it more next time. |
I did some investigation, however I don't have a list of all options that we can use. If that makes sense, I would keep it for another community call (as I will not be maybe able to join today). Sorry for the issues. |
@im-konge thank you for investigating.
What do you mean by that? If you need input feel free to ping me. |
No problem.
IIRC the questions on the community call were about how we will continue with this, the installation options etc. So I just tried that now more and yes, one option is to use the Helm chart as you showed on the PR (#10277) or, because we are using mainly YAML files directly in our examples, we can go with the Deployment as mentioned in the https://github.com/kubernetes/kube-state-metrics/blob/main/docs/metrics/extend/customresourcestate-metrics.md . From here, we need to pass the config to the app - which can be done using
or, which at least FMPOV looks better in terms of maintainability, we can create a ConfigMap with the config itself: https://gist.github.com/im-konge/cbbe1212dfd7a194e6e7b1f421d0d0ed and then mount it to the Deployment. Once mounted, we will just need to use I guess this follows the way how we are providing some other metrics in our examples (keeping the metrics in ConfigMap). And thanks @sebastiangaiser for the examples, it really helped when trying these deployment options :). |
You're welcome, thank you for investigating and explaining :D |
Discussed on the community call on 5.9.2024: We did not really have much time to look into this in the detail. But there seem to be many open points and unknown things. So this should probably go through a proposal. The proposal should cover things such as:
Ideally, this should be all covered by the proposal. @sebastiangaiser Would you be interested to put together the proposal for this? If not, someone else might have a look into it. |
@scholzj I can try to write a proposal (have red some of them but might need some guidance on that) but I'm not sure if I have the time this week but I will try to do this in time. |
@sebastiangaiser Great, feel free to ping me or @im-konge for any help. I don't think there is any need to worry about the time - when you get to it it will be great. If not, someone else might. But there is definitely no requirement to have something ready this or next week. |
…us-rules In order to implement https://github.com/strimzi/proposals/blob/main/087-monitoring-of-custom-resources.md an initial version of the configmap and prometheus-rules are added for 'KafkaUser' and 'KafkaTopic' resources. Part of strimzi#10276 Signed-off-by: Sebastian Gaiser <sebastiangaiser@users.noreply.github.com>
…us-rules In order to implement https://github.com/strimzi/proposals/blob/main/087-monitoring-of-custom-resources.md an initial version of the configmap and prometheus-rules are added for 'KafkaUser' and 'KafkaTopic' resources. Part of strimzi#10276 Signed-off-by: Sebastian Gaiser <sebastiangaiser@users.noreply.github.com>
…us-rules In order to implement https://github.com/strimzi/proposals/blob/main/087-monitoring-of-custom-resources.md an initial version of the configmap and prometheus-rules are added for 'KafkaUser' and 'KafkaTopic' resources. Part of strimzi#10276 Signed-off-by: Sebastian Gaiser <sebastiangaiser@users.noreply.github.com>
…us-rules In order to implement https://github.com/strimzi/proposals/blob/main/087-monitoring-of-custom-resources.md an initial version of the configmap and prometheus-rules are added for 'KafkaUser' and 'KafkaTopic' resources. Part of strimzi#10276 Signed-off-by: Sebastian Gaiser <sebastiangaiser@users.noreply.github.com>
…theusrules In order to implement https://github.com/strimzi/proposals/blob/main/087-monitoring-of-custom-resources.md the configmap and prometheus-rules are extended for 'Kafka', 'KafkaNodePool', 'StrimziPodSet' and 'KafkaRebalance' resources. Part of strimzi#10276 Signed-off-by: Sebastian Gaiser <sebastian.gaiser@hetzner-cloud.de>
Thanks for merging the PRs. Currently still open custom resources are:
I'm lacking for deployed resources, so if any volunteer is there, feel free to take over... |
Please keep in mind that |
Related problem
In #9802 there was a discussion about how to monitor the state of a custom resources (CR) like
KafkaTopic
,KafkaUser
, ... .Suggested solution
There was a suggestion to use kube-state-metrics (ksm) to monitor the state of each CR. For deploying the
kube-state-metrics
, personally I would recommend using the kube-state-metrics Helm chart which is already part of the kube-prometheus-stack (via a sub-chart).Using ksm relies on the status object of a Kubernetes resource.
Alternatives
No response
Additional context
Flux also handle this via
kube-state-metrics
.:Flux documentation: https://fluxcd.io/flux/monitoring/custom-metrics/
Flux example repository: https://github.com/fluxcd/flux2-monitoring-example
The text was updated successfully, but these errors were encountered: