diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-08 13:55:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-08 13:55:21 +0200 |
commit | 558ba1b99ec5af32e0e92934dc87c7461a975469 (patch) | |
tree | 36d79d40c2f469fdc8cc977d9738e7782058d661 /pkg/domain/infra | |
parent | 180a3c42d254ada21366a5ca511f234a9b2bbcd5 (diff) | |
parent | f18ccbcc0f70c23a6b854130395d9a940383290b (diff) | |
download | podman-558ba1b99ec5af32e0e92934dc87c7461a975469.tar.gz podman-558ba1b99ec5af32e0e92934dc87c7461a975469.tar.bz2 podman-558ba1b99ec5af32e0e92934dc87c7461a975469.zip |
Merge pull request #11468 from Luap99/play-kube-slirp
fix play kube --network options
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r-- | pkg/domain/infra/abi/play.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go index 2799df794..c9a6930f7 100644 --- a/pkg/domain/infra/abi/play.go +++ b/pkg/domain/infra/abi/play.go @@ -196,9 +196,11 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY if (ns.IsBridge() && len(cniNets) == 0) || ns.IsHost() { return nil, errors.Errorf("invalid value passed to --network: bridge or host networking must be configured in YAML") } - logrus.Debugf("Pod %q joining CNI networks: %v", podName, cniNets) - podOpt.Net.Network.NSMode = specgen.Bridge - podOpt.Net.CNINetworks = append(podOpt.Net.CNINetworks, cniNets...) + + podOpt.Net.Network = ns + if len(cniNets) > 0 { + podOpt.Net.CNINetworks = append(podOpt.Net.CNINetworks, cniNets...) + } if len(netOpts) > 0 { podOpt.Net.NetworkOptions = netOpts } |