Merge pull request #89974 from ahg-g/ahg-info

scheduler's NodeInfo tracks PodInfos instead of Pods
This commit is contained in:
Kubernetes Prow Robot
2020-04-09 09:19:58 -07:00
committed by GitHub
25 changed files with 358 additions and 381 deletions

View File

@@ -285,8 +285,8 @@ func (pl *ServiceAffinity) Score(ctx context.Context, state *framework.CycleStat
for _, existingPod := range nodeInfo.Pods() {
// Ignore pods being deleted for spreading purposes
// Similar to how it is done for SelectorSpreadPriority
if pod.Namespace == existingPod.Namespace && existingPod.DeletionTimestamp == nil {
if selector.Matches(labels.Set(existingPod.Labels)) {
if pod.Namespace == existingPod.Pod.Namespace && existingPod.Pod.DeletionTimestamp == nil {
if selector.Matches(labels.Set(existingPod.Pod.Labels)) {
score++
}
}