-
Notifications
You must be signed in to change notification settings - Fork 2k
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
pod: add gauge for runtimeclass handler #1276
Conversation
I have limited context here. From looking at the code around it looks consistent and seems to be taking the proper value for the dimension. As next step maybe we can add supported runtime handlers to the kube_node_info /lgtm |
Interesting. I'm not sure there's an easy way for the node to know in a clean way what runtime handlers are available. RuntimeClass can optionally specify the nodeSelect, but that isn't always necessarily used. |
internal/store/pod.go
Outdated
}), | ||
), | ||
*generator.NewFamilyGenerator( | ||
"kube_pod_runtimeclass_handler", |
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.
Can we add a unit test for this, thanks! :)
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.
As per best practices the name should be kube_pod_runtimeclass_handler_info
, can you adjust that as well, thanks!
What would be the use of that metric? |
To answer the issue question: If you manage to address the comment before our next release (which will be tomorrow most likely) we can merge this into 2.0.0-alpha.2 cut, otherwise it will have to wait until 2.0 is shipped as we are going into code freeze after that for 2.0. |
Thanks for the quick feedback @lilic. I updated the commit to include unit test (whoops sorry!) and to add I also changed the metric name from runtimeclass_handler to runtimeclass_name. |
46ce5c3
to
e09eb53
Compare
Add a metric gauge to provide observability for the runtimeclass used for running a pod. Signed-off-by: Eric Ernst <eric_ernst@apple.com>
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
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: egernst, lilic, SergeyKanzhelev The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
This adds a metric for observability of the RuntimeClass feature:
kube_pod_runtimeclass_handler
Using this metrics allows end-users to quickly verify that the RuntimeClass feature is being utilized and is healthy.
When combined with the kube_pod_status_phase, end-users can use tools like grafana to quickly assess how pods running with a particular runtimeclass are behaving compared to other runtimeclasses and the default runtime.
Which issue(s) this PR fixes
Fixes: #1274