Skip to content

Commit

Permalink
Merge pull request #886 from wzshiming/fix/alway-renew-leases
Browse files Browse the repository at this point in the history
Fix always renew lease when disconnection from apiserver
  • Loading branch information
wzshiming authored Dec 27, 2023
2 parents 4181e21 + 4df634b commit 2897931
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/kwok/controllers/node_lease_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ func (c *NodeLeaseController) syncWorker(ctx context.Context) {
now := c.clock.Now()
c.sync(ctx, nodeName)
nextTime := c.nextTryTime(nodeName, now)
_ = c.delayQueue.AddAfter(nodeName, nextTime.Sub(now))
dur := nextTime.Sub(now)
if dur > 0 {
_ = c.delayQueue.AddAfter(nodeName, dur)
}
}
}

Expand Down

0 comments on commit 2897931

Please sign in to comment.