From 6b8b8491bb742603431b5dfc6d8bc482eb697e74 Mon Sep 17 00:00:00 2001 From: Valentyn Boginskey Date: Fri, 6 Dec 2019 10:38:18 -0500 Subject: [PATCH] Raise verbosity of kubelet_node_status messages In standalone kubelet scenarios, `initialNode` gets called in a loop via `syncPod` -> `GetNode` -> `initialNode`. This causes excessive log spam from the controller attach/detach messages. --- pkg/kubelet/kubelet_node_status.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/kubelet/kubelet_node_status.go b/pkg/kubelet/kubelet_node_status.go index 5ed554c0fe8..6e5fe5fbf9f 100644 --- a/pkg/kubelet/kubelet_node_status.go +++ b/pkg/kubelet/kubelet_node_status.go @@ -291,17 +291,17 @@ func (kl *Kubelet) initialNode(ctx context.Context) (*v1.Node, error) { node.Annotations = make(map[string]string) } - klog.Infof("Setting node annotation to enable volume controller attach/detach") + klog.V(2).Infof("Setting node annotation to enable volume controller attach/detach") node.Annotations[volutil.ControllerManagedAttachAnnotation] = "true" } else { - klog.Infof("Controller attach/detach is disabled for this node; Kubelet will attach and detach volumes") + klog.V(2).Infof("Controller attach/detach is disabled for this node; Kubelet will attach and detach volumes") } if kl.keepTerminatedPodVolumes { if node.Annotations == nil { node.Annotations = make(map[string]string) } - klog.Infof("Setting node annotation to keep pod volumes of terminated pods attached to the node") + klog.V(2).Infof("Setting node annotation to keep pod volumes of terminated pods attached to the node") node.Annotations[volutil.KeepTerminatedPodVolumesAnnotation] = "true" }