kube-controller-manager: convert to structured logging
Most of the individual controllers were already converted earlier. Some log calls were missed or added and then not updated during a rebase. Some of those get updated here to fill those gaps. Adding of the name to the logger used by each controller gets consolidated in this commit. By using the name under which the controller is registered we ensure that the names in the log are consistent.
This commit is contained in:
@@ -1274,7 +1274,7 @@ func (dsc *DaemonSetsController) syncDaemonSet(ctx context.Context, key string)
|
||||
case err != nil && statusErr != nil:
|
||||
// If there was an error, and we failed to update status,
|
||||
// log it and return the original error.
|
||||
klog.Error(statusErr, "Failed to update status", "daemonSet", klog.KObj(ds))
|
||||
logger.Error(statusErr, "Failed to update status", "daemonSet", klog.KObj(ds))
|
||||
return err
|
||||
case err != nil:
|
||||
return err
|
||||
|
Reference in New Issue
Block a user