diff options
author | baude <bbaude@redhat.com> | 2019-02-13 13:22:58 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-02-13 13:51:23 -0600 |
commit | dd74467fd8dcbdab35b4c7fc2dc183d12fb228f2 (patch) | |
tree | 647d88b335a6da3e6fbdf481694223fd9b7c8026 /libpod/kube.go | |
parent | 8a16f83b0a13ab9de1cc905a3ff1132c75739995 (diff) | |
download | podman-dd74467fd8dcbdab35b4c7fc2dc183d12fb228f2.tar.gz podman-dd74467fd8dcbdab35b4c7fc2dc183d12fb228f2.tar.bz2 podman-dd74467fd8dcbdab35b4c7fc2dc183d12fb228f2.zip |
show container ports of network namespace
in cases where a container is part of a network namespace, we should
show the network namespace's ports when dealing with ports. this
impacts ps, kube, and port.
fixes: #846
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/kube.go')
-rw-r--r-- | libpod/kube.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/kube.go b/libpod/kube.go index 16cebf99b..484127870 100644 --- a/libpod/kube.go +++ b/libpod/kube.go @@ -228,7 +228,11 @@ func containerToV1Container(c *Container) (v1.Container, error) { return kubeContainer, nil } - ports, err := ocicniPortMappingToContainerPort(c.PortMappings()) + portmappings, err := c.PortMappings() + if err != nil { + return kubeContainer, err + } + ports, err := ocicniPortMappingToContainerPort(portmappings) if err != nil { return kubeContainer, nil } |