-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
capture start time for containers in terminated state #1519
capture start time for containers in terminated state #1519
Conversation
Welcome @harjas27! |
/approve Thanks for your contribution. Waiting for a second maintainer to approve. |
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.
Would you mind also adding the start time for the Waiting
status so that we have it for all the status?
@dgrisonnet there is no field for |
Ah, indeed I thought it was common to all status. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dgrisonnet, harjas27, mrueg 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 |
* [FEATURE] Add --use-apiserver-cache flag to set resourceVersion=0 for ListWatch requests kubernetes#1548 * [FEATURE] Introduce metrics for Kubernetes object annotations kubernetes#1468 * [FEATURE] Introduce start time metric for containers in terminated state kubernetes#1519 * [FEATURE] Introduce metrics for cronjob job history limits kubernetes#1535 * [FEATURE] Add system_uuid dimension to kube_node_info metric kubernetes#1535 * [FEATURE] Add available replica metric for statefulsets kubernetes#1532 * [FEATURE] Add ready replica metric for deployments kubernetes#1534 * [CHANGE] Update go clients for Kubernetes to support 1.22 kubernetes#1545 * [CHANGE] Use new promlint package and update prometheus cli to 2.28.1 kubernetes#1531
What this PR does / why we need it:
In reference to the metric:
The metric is collected only for the containers which are in "Running" state and not when the state of the container is "Terminated". The metric can be collected for the "Terminated" containers as well, this PR adds the logic for the same.
This will fix the issue where this metric is missing for pods which run for a short time and the containers are terminated after completion of the job/task
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #1467