Skip to content

Commit 6b8b849

Browse files
committed
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.
1 parent 616fce7 commit 6b8b849

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/kubelet/kubelet_node_status.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,17 +291,17 @@ func (kl *Kubelet) initialNode(ctx context.Context) (*v1.Node, error) {
291291
node.Annotations = make(map[string]string)
292292
}
293293

294-
klog.Infof("Setting node annotation to enable volume controller attach/detach")
294+
klog.V(2).Infof("Setting node annotation to enable volume controller attach/detach")
295295
node.Annotations[volutil.ControllerManagedAttachAnnotation] = "true"
296296
} else {
297-
klog.Infof("Controller attach/detach is disabled for this node; Kubelet will attach and detach volumes")
297+
klog.V(2).Infof("Controller attach/detach is disabled for this node; Kubelet will attach and detach volumes")
298298
}
299299

300300
if kl.keepTerminatedPodVolumes {
301301
if node.Annotations == nil {
302302
node.Annotations = make(map[string]string)
303303
}
304-
klog.Infof("Setting node annotation to keep pod volumes of terminated pods attached to the node")
304+
klog.V(2).Infof("Setting node annotation to keep pod volumes of terminated pods attached to the node")
305305
node.Annotations[volutil.KeepTerminatedPodVolumesAnnotation] = "true"
306306
}
307307

0 commit comments

Comments
 (0)