From 600b827a81b21c884b94554a0b7f398ba9177a20 Mon Sep 17 00:00:00 2001 From: hiddenmarten Date: Mon, 9 Dec 2024 17:32:22 +0100 Subject: [PATCH] Fix calculations in log message about resource expiration --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 9b86ffc..a16b437 100644 --- a/main.go +++ b/main.go @@ -169,7 +169,7 @@ func DoReconcile(dynamicClient dynamic.Interface, eventManager *kevent.EventMana // Cool off a tiny bit to avoid hitting the API too often time.Sleep(ThrottleDuration) } else { - log.Printf("[%s/%s] is configured with a TTL of %s, which means it will expire in %s", apiResource.Name, item.GetName(), ttl, time.Until(item.GetCreationTimestamp().Add(ttlInDuration)).Round(time.Second)) + log.Printf("[%s/%s] is configured with a TTL of %s, which means it will expire in %s", apiResource.Name, item.GetName(), ttl, time.Until(getStartTime(item).Add(ttlInDuration)).Round(time.Second)) } } // Cool off a tiny bit to avoid hitting the API too often