-
Notifications
You must be signed in to change notification settings - Fork 41
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
[PLAT-520] Added kube-state-metrics support #126
base: master
Are you sure you want to change the base?
Conversation
Summary - Users can provide the custom endpoint for kube-state-metrics. - Users can install the kube-state-metrics and the platform in the same namespace with a single flag modification. Testing I have done the following testing - - Custom kube-state-metrics endpoint. - kube-state-metrics installation. - Platform chart will use the custom endpoint if the user provides both installation flag and custom endpoint. I have provided a higher priority to the custom endpoint than the installation. - Default platform chart installation works as intended.
Summary - The kube-state-metric changed the following CPU metric name. And the Yugabyte Platform java code still uses the old metric name to show the CPU metric on Platform UI. At this place, we had two ways to solve this. Either update the java code or handle it in the Prometheus scrape configuration. We have chosen the second approach and fixed the Prometheus scrape configuration. Test - Deployed the platform using without this change and created the universe. We didn't have CPU metrics in the Platform UI at this time. Once I modified the Prometheus config using the helm upgrade, it started showing the CPU metrics.
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.
LGTM.
One question.
@anmalysh-yb I have modified the changes as per the suggestion. Could you please review the latest change and this related PR? |
@anmalysh-yb Please check it once. |
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.
Nice!
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.
Overall this looks good, I have suggested few changes.
1. kubeStateMetric to kubeStateMetrics 2. Added a few explanatory comments Co-authored-by: Bhavin Gandhi <bhavin192@users.noreply.github.com>
Summary
Testing
I have done the following testing -
For second commit which has changes related to prometheus scrape configuration.
Summary
The kube-state-metric changed the following CPU metric name. And the Yugabyte Platform java code still uses the old metric name to show the CPU metric on Platform UI. At this place, we had two ways to solve this. Either update the java code or handle it in the Prometheus scrape configuration.
We have chosen the second approach and fixed the Prometheus scrape configuration.I have updated the Platform code to use the new CPU metric (kube_pod_container_resource_requests) and added the relabel in Prometheus to convert the old CPU metric (kube_pod_container_resource_requests_cpu_cores) to new.
Test