-
Notifications
You must be signed in to change notification settings - Fork 963
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
feat: Add build_info metric with version, sha, goversion labels #5213
Conversation
✅ Deploy Preview for karpenter-docs-prod canceled.
|
Co-authored-by: Jonathan Innis <jonathan.innis.ji@gmail.com>
I think PR is ready for review, please check it. Also, let me know if docs should be updated. Quick check shows that I can open PR to update metrics page https://github.com/aws/karpenter-provider-aws/blob/main/website/content/en/docs/reference/metrics.md |
Pull Request Test Coverage Report for Build 7132706642Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
Co-authored-by: Jonathan Innis <jonathan.innis.ji@gmail.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 🚀
Fixes kubernetes-sigs/karpenter#665
Description
As described in the issue, it's useful to have metric with at least version label, which makes easier to find what version was running at each time to correlate issues related to update, etc. Example https://www.robustperception.io/exposing-the-software-version-to-prometheus/
So far this implementation might be a little bit "naive", since I tried to adopt existing code in project to add one more metric. If this should be done in a different way, I'm glad to have a feedback.
Also, I added only version and golang_version labels, because they're already available. In theory more can be added, like branch or sha. Not sure if they're very useful though.
I checked contribution guide and tried to follow it.
How was this change tested?
Did
make apply
with pushing image to temporary ECR registry and deploying karpenter to my test EKS cluster.All works fine, example of metric output:
Does this change impact docs?
Not sure, probably need to update docs, but closer to PR be ready to merge.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.