Aggregated used ports at the NodeInfo level.
This commit is contained in:
@@ -814,8 +814,7 @@ func PodFitsHostPorts(pod *v1.Pod, meta interface{}, nodeInfo *schedulercache.No
|
||||
return true, nil, nil
|
||||
}
|
||||
|
||||
// TODO: Aggregate it at the NodeInfo level.
|
||||
existingPorts := GetUsedPorts(nodeInfo.Pods()...)
|
||||
existingPorts := nodeInfo.UsedPorts()
|
||||
for wport := range wantPorts {
|
||||
if wport != 0 && existingPorts[wport] {
|
||||
return false, []algorithm.PredicateFailureReason{ErrPodNotFitsHostPorts}, nil
|
||||
|
Reference in New Issue
Block a user