mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
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.
This commit is contained in:
parent
616fce7839
commit
6b8b8491bb
@ -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"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user