Skip to content

Commit 0dae9b0

Browse files
authored
delay timer is incorrect (#5499)
Signed-off-by: clyi <[email protected]>
1 parent 1ea9d09 commit 0dae9b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/pod.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ func (c *Controller) enqueueUpdatePod(oldObj, newObj any) {
357357
var delay time.Duration
358358
if newPod.Spec.TerminationGracePeriodSeconds != nil {
359359
if !newPod.DeletionTimestamp.IsZero() {
360-
delay = time.Until(newPod.DeletionTimestamp.Add(time.Duration(*newPod.Spec.TerminationGracePeriodSeconds) * time.Second))
360+
delay = time.Until(newPod.DeletionTimestamp.Time)
361361
} else {
362362
delay = time.Duration(*newPod.Spec.TerminationGracePeriodSeconds) * time.Second
363363
}

0 commit comments

Comments
 (0)