mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
rkt: When host port is zero, we should not forward the port.
This commit is contained in:
parent
83c121e921
commit
36f3185223
@ -749,6 +749,9 @@ func (r *Runtime) newAppcRuntimeApp(pod *api.Pod, c api.Container, pullSecrets [
|
||||
|
||||
// Set global ports.
|
||||
for _, port := range opts.PortMappings {
|
||||
if port.HostPort == 0 {
|
||||
continue
|
||||
}
|
||||
manifest.Ports = append(manifest.Ports, appctypes.ExposedPort{
|
||||
Name: convertToACName(port.Name),
|
||||
HostPort: uint(port.HostPort),
|
||||
|
Loading…
Reference in New Issue
Block a user