diff --git a/pkg/kubelet/util/manager/watch_based_manager.go b/pkg/kubelet/util/manager/watch_based_manager.go index fa4642fe1e9..ba0bfe35bc0 100644 --- a/pkg/kubelet/util/manager/watch_based_manager.go +++ b/pkg/kubelet/util/manager/watch_based_manager.go @@ -313,7 +313,7 @@ func (c *objectCache) Get(namespace, name string) (runtime.Object, error) { if c.isImmutable(object) { item.setImmutable() if item.stop() { - klog.V(4).Infof("Stopped watching for changes of %q/%q - object is immutable", namespace, name) + klog.V(4).InfoS("Stopped watching for changes - object is immutable", "obj", klog.KRef(namespace, name)) } } return object, nil diff --git a/pkg/kubelet/util/nodelease.go b/pkg/kubelet/util/nodelease.go index ce520396734..9e1b00b7624 100644 --- a/pkg/kubelet/util/nodelease.go +++ b/pkg/kubelet/util/nodelease.go @@ -46,7 +46,7 @@ func SetNodeOwnerFunc(c clientset.Interface, nodeName string) func(lease *coordi }, } } else { - klog.Errorf("failed to get node %q when trying to set owner ref to the node lease: %v", nodeName, err) + klog.ErrorS(err, "Failed to get node when trying to set owner ref to the node lease", "node", klog.KRef("", nodeName)) return err } } diff --git a/pkg/kubelet/util/util_unix.go b/pkg/kubelet/util/util_unix.go index 4aa5e5b5548..dafc22471b7 100644 --- a/pkg/kubelet/util/util_unix.go +++ b/pkg/kubelet/util/util_unix.go @@ -100,7 +100,7 @@ func parseEndpointWithFallbackProtocol(endpoint string, fallbackProtocol string) fallbackEndpoint := fallbackProtocol + "://" + endpoint protocol, addr, err = parseEndpoint(fallbackEndpoint) if err == nil { - klog.Warningf("Using %q as endpoint is deprecated, please consider using full url format %q.", endpoint, fallbackEndpoint) + klog.InfoS("Using this endpoint is deprecated, please consider using full URL format", "endpoint", endpoint, "URL", fallbackEndpoint) } } return