[PLAT-520] Added kube-state-metrics support#126
Open
baba230896 wants to merge 5 commits intoyugabyte:masterfrom
Open
[PLAT-520] Added kube-state-metrics support#126baba230896 wants to merge 5 commits intoyugabyte:masterfrom
baba230896 wants to merge 5 commits intoyugabyte:masterfrom
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.
Contributor
Author
|
@anmalysh-yb I have modified the changes as per the suggestion. Could you please review the latest change and this related PR? |
Contributor
Author
|
@anmalysh-yb Please check it once. |
bhavin192
suggested changes
May 4, 2022
Contributor
bhavin192
left a comment
There was a problem hiding this comment.
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>
Contributor
|
This could be likely done via chart dependency to the official kube-state-metrics helm chart: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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