mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 16:29:21 +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.
|
// Set global ports.
|
||||||
for _, port := range opts.PortMappings {
|
for _, port := range opts.PortMappings {
|
||||||
|
if port.HostPort == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
manifest.Ports = append(manifest.Ports, appctypes.ExposedPort{
|
manifest.Ports = append(manifest.Ports, appctypes.ExposedPort{
|
||||||
Name: convertToACName(port.Name),
|
Name: convertToACName(port.Name),
|
||||||
HostPort: uint(port.HostPort),
|
HostPort: uint(port.HostPort),
|
||||||
|
Loading…
Reference in New Issue
Block a user