1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

Merge pull request #502 from damemi/node-affinity-totalevicted

Move 'total pods evicted' log message to main loop
This commit is contained in:
Kubernetes Prow Robot
2021-02-19 13:45:41 -08:00
committed by GitHub
3 changed files with 2 additions and 3 deletions

View File

@@ -130,6 +130,8 @@ func RunDeschedulerStrategies(ctx context.Context, rs *options.DeschedulerServer
} }
} }
klog.V(1).InfoS("Number of evicted pods", "totalEvicted", podEvictor.TotalEvicted())
// If there was no interval specified, send a signal to the stopChannel to end the wait.Until loop after 1 iteration // If there was no interval specified, send a signal to the stopChannel to end the wait.Until loop after 1 iteration
if rs.DeschedulingInterval.Seconds() == 0 { if rs.DeschedulingInterval.Seconds() == 0 {
close(stopChannel) close(stopChannel)

View File

@@ -149,8 +149,6 @@ func LowNodeUtilization(ctx context.Context, client clientset.Interface, strateg
lowNodes, lowNodes,
podEvictor, podEvictor,
evictable.IsEvictable) evictable.IsEvictable)
klog.V(1).InfoS("Total number of pods evicted", "evictedPods", podEvictor.TotalEvicted())
} }
// validateStrategyConfig checks if the strategy's config is valid // validateStrategyConfig checks if the strategy's config is valid

View File

@@ -104,5 +104,4 @@ func RemovePodsViolatingNodeAffinity(ctx context.Context, client clientset.Inter
klog.ErrorS(nil, "Invalid nodeAffinityType", "nodeAffinity", nodeAffinity) klog.ErrorS(nil, "Invalid nodeAffinityType", "nodeAffinity", nodeAffinity)
} }
} }
klog.V(1).InfoS("Number of evicted pods", "totalEvicted", podEvictor.TotalEvicted())
} }