kube-state-metrics
kube-state-metrics copied to clipboard
feat: add kube_pod_container_status_last_terminated_timestamp metric
What this PR does / why we need it:
Adds kube_pod_container_status_last_terminated_timestamp metric to report the time when container was last time terminated with the kube_pod_container_status_last_terminated_reason. This metric is useful for cases like getting the crash situation - as described in this issue: https://github.com/kubernetes/kube-state-metrics/issues/1805#issuecomment-1219182114
How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)
Adds a new metric in cases when the kube_pod_container_status_last_terminated_reason is reported
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 #
Welcome @tetianakravchenko!
It looks like this is your first PR to kubernetes/kube-state-metrics 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes/kube-state-metrics has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
/triage accepted /assign @rexagod
@tetianakravchenko Tests seem to be failing here.
@tetianakravchenko Tests seem to be failing here.
Hey @rexagod I've fixed tests, please have a look
Hey @rexagod @mrueg could you please check this PR?
This feature would be super helpful! Anything missing to get this in? :)
Hey @rexagod could you please have another look on this PR?
/lgtm
Thanks for your contribution!
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: mrueg, tetianakravchenko
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [mrueg]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment