diff --git a/cluster-autoscaler/clusterstate/clusterstate.go b/cluster-autoscaler/clusterstate/clusterstate.go index 894fe1008aa2..a2335193e073 100644 --- a/cluster-autoscaler/clusterstate/clusterstate.go +++ b/cluster-autoscaler/clusterstate/clusterstate.go @@ -645,7 +645,7 @@ func (csr *ClusterStateRegistry) updateReadinessStats(currentTime time.Time) { continue } if nodeGroup == nil || reflect.ValueOf(nodeGroup).IsNil() { - klog.Warningf("Nodegroup is nil for %s", unregistered.Node.Name) + klog.V(4).Infof("Nodegroup is nil for %s", unregistered.Node.Name) continue } perNgCopy := perNodeGroup[nodeGroup.Id()] @@ -1052,7 +1052,7 @@ func (csr *ClusterStateRegistry) hasCloudProviderInstance(node *apiv1.Node) bool if err == nil { return exists } - if !errors.Is(err, cloudprovider.ErrNotImplemented) { + if !errors.Is(err, cloudprovider.ErrNotImplemented) && klog.V(4).Enabled() { klog.Warningf("Failed to check cloud provider has instance for %s: %v", node.Name, err) } return !taints.HasToBeDeletedTaint(node) diff --git a/cluster-autoscaler/clusterstate/utils/node_instances_cache.go b/cluster-autoscaler/clusterstate/utils/node_instances_cache.go index ac2723eb4acd..b4241fbf86ec 100644 --- a/cluster-autoscaler/clusterstate/utils/node_instances_cache.go +++ b/cluster-autoscaler/clusterstate/utils/node_instances_cache.go @@ -153,7 +153,7 @@ func (cache *CloudProviderNodeInstancesCache) InvalidateCacheEntry(nodeGroup clo // Refresh refreshes cache. func (cache *CloudProviderNodeInstancesCache) Refresh() { - klog.Infof("Start refreshing cloud provider node instances cache") + klog.V(4).Infof("Start refreshing cloud provider node instances cache") refreshStart := time.Now() nodeGroups := cache.cloudProvider.NodeGroups() diff --git a/cluster-autoscaler/core/static_autoscaler.go b/cluster-autoscaler/core/static_autoscaler.go index 027ec59630b3..7090c36fcf73 100644 --- a/cluster-autoscaler/core/static_autoscaler.go +++ b/cluster-autoscaler/core/static_autoscaler.go @@ -748,7 +748,9 @@ func (a *StaticAutoscaler) removeOldUnregisteredNodes(allUnregisteredNodes []clu continue } if nodeGroup == nil || reflect.ValueOf(nodeGroup).IsNil() { - klog.Warningf("No node group for node %s, skipping", unregisteredNode.Node.Name) + if klog.V(4).Enabled() { + klog.Warningf("No node group for node %s, skipping", unregisteredNode.Node.Name) + } continue } diff --git a/cluster-autoscaler/update_toc.py b/cluster-autoscaler/update_toc.py index 34a7d2639b51..c7c8c7980b92 100755 --- a/cluster-autoscaler/update_toc.py +++ b/cluster-autoscaler/update_toc.py @@ -24,7 +24,7 @@ def updateFAQ(): faq_content = faq_file.read() faq_lines = faq_content.splitlines() while faq_lines and faq_lines[-1] == '': - faq_lines = faq_lines[:-1] + faq_lines = faq_lines[:-1] prefixes = (SECTION_PREFIX, QUESTION_PREFIX) toc_elements = []