Skip to content

Commit

Permalink
chore(issue-7071): added verbosity levels
Browse files Browse the repository at this point in the history
Signed-off-by: ivan katliarchuk <[email protected]>
  • Loading branch information
ivankatliarchuk committed Aug 17, 2024
1 parent fd4fb40 commit 2138a74
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions cluster-autoscaler/clusterstate/clusterstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,7 @@ func (csr *ClusterStateRegistry) updateReadinessStats(currentTime time.Time) {
continue
}
if nodeGroup == nil || reflect.ValueOf(nodeGroup).IsNil() {
if klog.V(10).Enabled() {
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()]
Expand Down Expand Up @@ -1054,7 +1052,7 @@ func (csr *ClusterStateRegistry) hasCloudProviderInstance(node *apiv1.Node) bool
if err == nil {
return exists
}
if !errors.Is(err, cloudprovider.ErrNotImplemented) && klog.V(10).Enabled() {
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (cache *CloudProviderNodeInstancesCache) InvalidateCacheEntry(nodeGroup clo

// Refresh refreshes cache.
func (cache *CloudProviderNodeInstancesCache) Refresh() {
klog.V(5).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()
Expand Down
2 changes: 1 addition & 1 deletion cluster-autoscaler/core/static_autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ func (a *StaticAutoscaler) removeOldUnregisteredNodes(allUnregisteredNodes []clu
continue
}
if nodeGroup == nil || reflect.ValueOf(nodeGroup).IsNil() {
if klog.V(10).Enabled() {
if klog.V(4).Enabled() {
klog.Warningf("No node group for node %s, skipping", unregisteredNode.Node.Name)
}
continue
Expand Down

0 comments on commit 2138a74

Please sign in to comment.