mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 20:00:07 +00:00
Merge pull request #137838 from hoskeri/leasespam
Fix logspam in leaderelection controller.
This commit is contained in:
@@ -166,7 +166,9 @@ func (c *Controller) processNextElectionItem(ctx context.Context) bool {
|
||||
}
|
||||
|
||||
intervalForRequeue, err := c.reconcileElectionStep(ctx, key)
|
||||
utilruntime.HandleErrorWithContext(ctx, err, "Failed to reconcile election step")
|
||||
if err != nil { // HandleErrorWithContext logs regardless of error value, filter out nil err.
|
||||
utilruntime.HandleErrorWithContext(ctx, err, "Failed to reconcile election step", "key", key)
|
||||
}
|
||||
if intervalForRequeue != noRequeue {
|
||||
defer c.queue.AddAfter(key, intervalForRequeue)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user