mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 21:25:09 +00:00
Fix #926
Make HostPort a real option without being set to ContainerPort if absent.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user