mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
no need check is nil, because has check before here
This commit is contained in:
@@ -51,10 +51,8 @@ func CalculateNodePreferAvoidPodsPriorityMap(pod *v1.Pod, meta interface{}, node
|
|||||||
}
|
}
|
||||||
for i := range avoids.PreferAvoidPods {
|
for i := range avoids.PreferAvoidPods {
|
||||||
avoid := &avoids.PreferAvoidPods[i]
|
avoid := &avoids.PreferAvoidPods[i]
|
||||||
if controllerRef != nil {
|
if avoid.PodSignature.PodController.Kind == controllerRef.Kind && avoid.PodSignature.PodController.UID == controllerRef.UID {
|
||||||
if avoid.PodSignature.PodController.Kind == controllerRef.Kind && avoid.PodSignature.PodController.UID == controllerRef.UID {
|
return schedulerapi.HostPriority{Host: node.Name, Score: 0}, nil
|
||||||
return schedulerapi.HostPriority{Host: node.Name, Score: 0}, nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return schedulerapi.HostPriority{Host: node.Name, Score: 10}, nil
|
return schedulerapi.HostPriority{Host: node.Name, Score: 10}, nil
|
||||||
|
Reference in New Issue
Block a user