Merge pull request #69495 from wgliang/feature/movenodoinfofunctions

[scheduler cleanup phase 1]: Move NodeInfo utils into pkg/scheduler/cache
This commit is contained in:
k8s-ci-robot
2018-10-11 07:12:40 -07:00
committed by GitHub
10 changed files with 393 additions and 356 deletions

View File

@@ -19,7 +19,7 @@ package predicates
import (
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
schedutil "k8s.io/kubernetes/pkg/scheduler/util"
schedulercache "k8s.io/kubernetes/pkg/scheduler/cache"
)
// FindLabelsInSet gets as many key/value pairs as possible out of a label set.
@@ -68,7 +68,7 @@ func CreateSelectorFromLabels(aL map[string]string) labels.Selector {
// portsConflict check whether existingPorts and wantPorts conflict with each other
// return true if we have a conflict
func portsConflict(existingPorts schedutil.HostPortInfo, wantPorts []*v1.ContainerPort) bool {
func portsConflict(existingPorts schedulercache.HostPortInfo, wantPorts []*v1.ContainerPort) bool {
for _, cp := range wantPorts {
if existingPorts.CheckConflict(cp.HostIP, string(cp.Protocol), cp.HostPort) {
return true