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

Add more topology spread logs

This commit is contained in:
Mike Dame
2020-12-01 17:02:46 -05:00
parent 7bcd562ff5
commit 2b5ec01381

View File

@@ -106,6 +106,7 @@ func RemovePodsViolatingTopologySpreadConstraint(
klog.ErrorS(err, "Couldn't list namespaces")
return
}
klog.V(1).InfoS("Processing namespaces for topology spread constraints")
podsForEviction := make(map[*v1.Pod]struct{})
// 1. for each namespace...
for _, namespace := range namespaces.Items {
@@ -267,6 +268,7 @@ func balanceDomains(
aboveToEvict[k].Spec.Affinity.NodeAffinity != nil &&
aboveToEvict[k].Spec.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution != nil &&
nodesPodFitsOnBesidesCurrent(aboveToEvict[k], nodeMap) == 0) {
klog.V(2).InfoS("Ignoring pod for eviction due to node selector/affinity", "pod", klog.KObj(aboveToEvict[k]))
continue
}
podsForEviction[aboveToEvict[k]] = struct{}{}