Skip to content

Commit

Permalink
fix: Log the correct time until expiration (#101)
Browse files Browse the repository at this point in the history
Fix calculations in log message about resource expiration
  • Loading branch information
hiddenmarten authored Dec 10, 2024
1 parent c79c7a7 commit 3bdee19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3bdee19

Please sign in to comment.