Merge pull request #86005 from grnhse/raise-kubelet-node-status-verbosity

Fix kubelet_node_status log spam
This commit is contained in:
Kubernetes Prow Robot 2020-05-20 22:46:35 -07:00 committed by GitHub
commit c579a3279f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -286,17 +286,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"
}