mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Update existing node lease with retry.
This commit is contained in:
parent
1719ce7883
commit
7773662b6a
@ -98,12 +98,10 @@ func (c *controller) sync() {
|
||||
// If at some point other agents will also be frequently updating the Lease object, this
|
||||
// can result in performance degradation, because we will end up with calling additional
|
||||
// GET/PUT - at this point this whole "if" should be removed.
|
||||
lease, err := c.leaseClient.Update(c.newLease(c.latestLease))
|
||||
err := c.retryUpdateLease(c.newLease(c.latestLease))
|
||||
if err == nil {
|
||||
c.latestLease = lease
|
||||
return
|
||||
}
|
||||
|
||||
klog.Infof("failed to update lease using latest lease, fallback to ensure lease, err: %v", err)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user