-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Implement missing metrics 9215 - container_spec_memory_reservation_li… #9357
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
base: main
Are you sure you want to change the base?
Implement missing metrics 9215 - container_spec_memory_reservation_li… #9357
Conversation
…mit_bytes Signed-off-by: Peri, Suryanarayana <suryanarayana.peri@fmr.com>
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: SuryanarayanaPeri The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @SuryanarayanaPeri. Thanks for your PR. I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Thank you @SuryanarayanaPeri . |
@bitoku - While I add the description to follow the PR Template; can you please provide details on the failing checks from above ? |
A friendly reminder that this PR had no activity for 30 days. |
This pull request introduces a new memory metric, container_spec_memory_reservation_limit_bytes, to track the memory reservation limit for containers. The changes include adding the metric descriptor, implementing logic to calculate its values, and ensuring it is included in the list of metrics exposed by the stats server.
Addition of the new memory metric:
internal/lib/stats/descriptors.go: Added the containerSpecMemoryReservationLimitBytes descriptor to define the new metric, including its name, help text, and associated label keys.
Implementation of metric value calculation:
internal/lib/stats/memory_metrics.go: Added logic to calculate the value of containerSpecMemoryReservationLimitBytes. If the reservation exceeds maxMemorySize (unlimited), it reports a value of 0; otherwise, it reports the reservation value as a gauge metric.
Integration with stats server:
internal/lib/stats/metrics.go: Included containerSpecMemoryReservationLimitBytes in the list of metrics exposed by the stats server to ensure it is available for monitoring.