summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-03 16:17:33 +0200
committerGitHub <noreply@github.com>2019-07-03 16:17:33 +0200
commit4712fe009a7c8bc41d997749c0fd2c102ac66e0c (patch)
tree2591313df34ab78bd8155965eebe20cafb041301 /libpod
parenta22a32a0a5507811168e0251a92122cf3e74ef51 (diff)
parent143ed8b826ef5b63a805198412b2d30dd2cd07f5 (diff)
downloadpodman-4712fe009a7c8bc41d997749c0fd2c102ac66e0c.tar.gz
podman-4712fe009a7c8bc41d997749c0fd2c102ac66e0c.tar.bz2
podman-4712fe009a7c8bc41d997749c0fd2c102ac66e0c.zip
Merge pull request #3486 from openSUSE/ocicni-bump
Vendor latest OCICNI version
Diffstat (limited to 'libpod')
-rw-r--r--libpod/networking_linux.go22
1 files changed, 12 insertions, 10 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index 93ec157c5..27585b8d5 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -28,21 +28,23 @@ import (
// Get an OCICNI network config
func (r *Runtime) getPodNetwork(id, name, nsPath string, networks []string, ports []ocicni.PortMapping, staticIP net.IP) ocicni.PodNetwork {
+ defaultNetwork := r.netPlugin.GetDefaultNetworkName()
network := ocicni.PodNetwork{
- Name: name,
- Namespace: name, // TODO is there something else we should put here? We don't know about Kube namespaces
- ID: id,
- NetNS: nsPath,
- PortMappings: ports,
- Networks: networks,
+ Name: name,
+ Namespace: name, // TODO is there something else we should put here? We don't know about Kube namespaces
+ ID: id,
+ NetNS: nsPath,
+ Networks: networks,
+ RuntimeConfig: map[string]ocicni.RuntimeConfig{
+ defaultNetwork: {PortMappings: ports},
+ },
}
if staticIP != nil {
- defaultNetwork := r.netPlugin.GetDefaultNetworkName()
-
network.Networks = []string{defaultNetwork}
- network.NetworkConfig = make(map[string]ocicni.NetworkConfig)
- network.NetworkConfig[defaultNetwork] = ocicni.NetworkConfig{IP: staticIP.String()}
+ network.RuntimeConfig = map[string]ocicni.RuntimeConfig{
+ defaultNetwork: {IP: staticIP.String(), PortMappings: ports},
+ }
}
return network