mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 20:00:07 +00:00
If the reconcileElectionStep function returns `noRequeue, nil`, it causes log
spam from apiserver. This is because HandleErrorWithContext regardless of
error value. Skip logging if error is nil.
Also, tag the log message with the involved lease object name.
```
...
{"ts":1773796037662.8264,"logger":"UnhandledError","caller":"leaderelection/leaderelection_controller.go:169","msg":"Failed to reconcile election step"}
{"ts":1773796038472.465,"logger":"UnhandledError","caller":"leaderelection/leaderelection_controller.go:169","msg":"Failed to reconcile election step"}
...
```