diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-07-03 16:17:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 16:17:33 +0200 |
commit | 4712fe009a7c8bc41d997749c0fd2c102ac66e0c (patch) | |
tree | 2591313df34ab78bd8155965eebe20cafb041301 /libpod | |
parent | a22a32a0a5507811168e0251a92122cf3e74ef51 (diff) | |
parent | 143ed8b826ef5b63a805198412b2d30dd2cd07f5 (diff) | |
download | podman-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.go | 22 |
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 |