summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-08 13:55:21 +0200
committerGitHub <noreply@github.com>2021-09-08 13:55:21 +0200
commit558ba1b99ec5af32e0e92934dc87c7461a975469 (patch)
tree36d79d40c2f469fdc8cc977d9738e7782058d661 /pkg/domain
parent180a3c42d254ada21366a5ca511f234a9b2bbcd5 (diff)
parentf18ccbcc0f70c23a6b854130395d9a940383290b (diff)
downloadpodman-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')
-rw-r--r--pkg/domain/infra/abi/play.go8
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
}