From a09a2e5e26e167a639759b133a330573ba9f9648 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 16 Aug 2024 10:27:27 +0200 Subject: [PATCH] Pod: Output deletion timestamp in Icinga state reason --- pkg/schema/v1/pod.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/schema/v1/pod.go b/pkg/schema/v1/pod.go index a8f99235..2ef72912 100644 --- a/pkg/schema/v1/pod.go +++ b/pkg/schema/v1/pod.go @@ -277,7 +277,7 @@ func (p *Pod) getIcingaState(pod *kcorev1.Pod) (IcingaState, string) { return Unknown, "" } // TODO(el): Return Critical if pod.DeletionTimestamp + pod.DeletionGracePeriodSeconds > now. - return Ok, fmt.Sprintf("Pod %s/%s is being deleted.", pod.Namespace, pod.Name) + return Ok, fmt.Sprintf("Pod %s/%s is being deleted at %s.", pod.Namespace, pod.Name, pod.DeletionTimestamp) } if PodIsEvicted(pod) {