add e2e test on the hostport predicates

This commit is contained in:
chenxingyu
2017-10-11 11:45:25 +08:00
parent 2d44ef9dfa
commit 954c97fe6d
9 changed files with 277 additions and 46 deletions

View File

@@ -24,6 +24,8 @@ import (
"k8s.io/kubernetes/pkg/apis/scheduling"
)
const DefaultBindAllHostIP = "0.0.0.0"
// GetUsedPorts returns the used host ports of Pods: if 'port' was used, a 'port:true' pair
// will be in the result; but it does not resolve port conflict.
func GetUsedPorts(pods ...*v1.Pod) map[string]bool {