summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
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
}