Make HostPort a real option without being set to ContainerPort if absent.
This commit is contained in:
Dawn Chen
2014-08-19 15:18:49 -07:00
parent bcf7a37e21
commit 5a2365b323
6 changed files with 15 additions and 9 deletions

View File

@@ -71,6 +71,9 @@ func (s *RandomFitScheduler) Schedule(pod api.Pod, minionLister MinionLister) (s
for _, scheduledPod := range machineToPods[machine] {
for _, container := range pod.DesiredState.Manifest.Containers {
for _, port := range container.Ports {
if port.HostPort == 0 {
continue
}
if s.containsPort(scheduledPod, port) {
podFits = false
}