mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 03:38:15 +00:00
Merge pull request #42524 from k82cn/used_ports_per_node
Automatic merge from submit-queue (batch tested with PRs 41775, 39678, 42629, 42524, 43028) Aggregated used ports at the NodeInfo level. fixes #42523 ```release-note Aggregated used ports at the NodeInfo level for `PodFitsHostPorts` predicate. ```
This commit is contained in:
@@ -836,8 +836,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