-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Update string parsing of allocatable cpu cores in kube_inventory #8512
Conversation
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.
Looks good to me. I cannot test, so I take your word on it. :-)
Now that I think about it, would it make sense to update the metric itself to be "allocatable_millicpu_cores" and scale the value by 1000? Otherwise decimal values would be rounded/truncated. |
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.
Also fine with me. :-)
(cherry picked from commit 99287d8)
The Allocatable cpu value returned from Kubernetes can have a milli suffix, which gets parsed as 0 when stored in allocatable_cpu_cores.
This change updates the metric to be millicpus to prevent truncation of decimals.
Required for all PRs: