Commit 8c83b5e0 authored by Edgar Lee's avatar Edgar Lee Committed by Brad Davidson

Rootless mode also bind service nodePort to host for LoadBalancer type

parent 3e948aa0
...@@ -143,11 +143,14 @@ func (h *handler) toBindPorts() (map[int]int, error) { ...@@ -143,11 +143,14 @@ func (h *handler) toBindPorts() (map[int]int, error) {
continue continue
} }
if port.Port != 0 { for _, toBindPort := range []int32{port.Port, port.NodePort} {
if port.Port <= 1024 { if toBindPort == 0 {
toBindPorts[10000+int(port.Port)] = int(port.Port) continue
}
if toBindPort <= 1024 {
toBindPorts[10000+int(toBindPort)] = int(toBindPort)
} else { } else {
toBindPorts[int(port.Port)] = int(port.Port) toBindPorts[int(toBindPort)] = int(toBindPort)
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment