diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-08-24 10:30:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-24 10:30:11 -0400 |
commit | e9daaf62e3921b8c696f3abd92f001a9447c8aa1 (patch) | |
tree | ea500d48f28682ad36f6eb4954717c6629fb68b4 /pkg/specgen/generate/kube/kube.go | |
parent | e20ec47a59b4ac65d42f3fee7b8b7ec5760ea35d (diff) | |
parent | c0b1edd6a4dcad2b89a01975988d186b21b3158e (diff) | |
download | podman-e9daaf62e3921b8c696f3abd92f001a9447c8aa1.tar.gz podman-e9daaf62e3921b8c696f3abd92f001a9447c8aa1.tar.bz2 podman-e9daaf62e3921b8c696f3abd92f001a9447c8aa1.zip |
Merge pull request #11232 from Luap99/network
Network interface
Diffstat (limited to 'pkg/specgen/generate/kube/kube.go')
-rw-r--r-- | pkg/specgen/generate/kube/kube.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go index d6d479c67..04b4e5ab3 100644 --- a/pkg/specgen/generate/kube/kube.go +++ b/pkg/specgen/generate/kube/kube.go @@ -12,6 +12,7 @@ import ( "github.com/containers/common/pkg/parse" "github.com/containers/common/pkg/secrets" "github.com/containers/image/v5/manifest" + "github.com/containers/podman/v3/libpod/network/types" ann "github.com/containers/podman/v3/pkg/annotations" "github.com/containers/podman/v3/pkg/specgen" "github.com/containers/podman/v3/pkg/specgen/generate" @@ -588,8 +589,8 @@ func envVarValue(env v1.EnvVar, opts *CtrSpecGenOptions) (string, error) { // getPodPorts converts a slice of kube container descriptions to an // array of portmapping -func getPodPorts(containers []v1.Container) []specgen.PortMapping { - var infraPorts []specgen.PortMapping +func getPodPorts(containers []v1.Container) []types.PortMapping { + var infraPorts []types.PortMapping for _, container := range containers { for _, p := range container.Ports { if p.HostPort != 0 && p.ContainerPort == 0 { @@ -598,7 +599,7 @@ func getPodPorts(containers []v1.Container) []specgen.PortMapping { if p.Protocol == "" { p.Protocol = "tcp" } - portBinding := specgen.PortMapping{ + portBinding := types.PortMapping{ HostPort: uint16(p.HostPort), ContainerPort: uint16(p.ContainerPort), Protocol: strings.ToLower(string(p.Protocol)), |