Commit a7dd554c authored by weizhanxu's avatar weizhanxu

no need check is nil, because has check before here

parent 28b47b5e
...@@ -51,11 +51,9 @@ func CalculateNodePreferAvoidPodsPriorityMap(pod *v1.Pod, meta interface{}, node ...@@ -51,11 +51,9 @@ 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
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment