What would you like to be added:
I would like terminationGracePeriodSeconds to be exposed as a metric.
Why is this needed:
I need to monitor if a pod is approaching the termination grace period. My plan is to compare the deletion timestamp to the grace period. Something like this:
(time() - kube_pod_deletion_timestamp) > on(pod, namespace) kube_pod_spec_termination_grace_period_seconds
This will help us determine if pods are being killed (or close to be killed) because they exceed their grace period. This is useful because if the pod does not shut down gracefully it can be disruptive to our users.
Describe the solution you'd like:
One option is adding a new metric called kube_pod_spec_termination_grace_period_seconds. I am flexible to whatever y'all prefer. I tried adding as a custom metric but that is not supported for pods because the group is blank (i believe that is by design per #2044 (comment)) .
Additional context:
What would you like to be added:
I would like terminationGracePeriodSeconds to be exposed as a metric.
Why is this needed:
I need to monitor if a pod is approaching the termination grace period. My plan is to compare the deletion timestamp to the grace period. Something like this:
(time() - kube_pod_deletion_timestamp) > on(pod, namespace) kube_pod_spec_termination_grace_period_seconds
This will help us determine if pods are being killed (or close to be killed) because they exceed their grace period. This is useful because if the pod does not shut down gracefully it can be disruptive to our users.
Describe the solution you'd like:
One option is adding a new metric called kube_pod_spec_termination_grace_period_seconds. I am flexible to whatever y'all prefer. I tried adding as a custom metric but that is not supported for pods because the group is blank (i believe that is by design per #2044 (comment)) .
Additional context: