summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-06-30 17:13:28 -0400
committerGitHub <noreply@github.com>2021-06-30 17:13:28 -0400
commitfd1715568b7c14451dcf2581c385c8d3e307d30e (patch)
tree40b067377bda67d7d4002100e7210547bf4317f5 /cmd/podman
parent61b7beaf8e595bdc1305a12b49e26a25bbc2bc42 (diff)
parent092902b455551d7353163c1e6d322f3605b9a897 (diff)
downloadpodman-fd1715568b7c14451dcf2581c385c8d3e307d30e.tar.gz
podman-fd1715568b7c14451dcf2581c385c8d3e307d30e.tar.bz2
podman-fd1715568b7c14451dcf2581c385c8d3e307d30e.zip
Merge pull request #10816 from rhatdan/network
Handle advanced --network options in podman play kube
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/common/netflags.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/cmd/podman/common/netflags.go b/cmd/podman/common/netflags.go
index 78cfe2f13..aa8714b50 100644
--- a/cmd/podman/common/netflags.go
+++ b/cmd/podman/common/netflags.go
@@ -2,7 +2,6 @@ package common
import (
"net"
- "strings"
"github.com/containers/common/pkg/completion"
"github.com/containers/podman/v3/cmd/podman/parse"
@@ -204,17 +203,13 @@ func NetFlagsToNetOptions(cmd *cobra.Command, netnsFromConfig bool) (*entities.N
return nil, err
}
- parts := strings.SplitN(network, ":", 2)
-
- ns, cniNets, err := specgen.ParseNetworkNamespace(network, containerConfig.Containers.RootlessNetworking == "cni")
+ ns, cniNets, options, err := specgen.ParseNetworkString(network)
if err != nil {
return nil, err
}
- if len(parts) > 1 {
- opts.NetworkOptions = make(map[string][]string)
- opts.NetworkOptions[parts[0]] = strings.Split(parts[1], ",")
- cniNets = nil
+ if len(options) > 0 {
+ opts.NetworkOptions = options
}
opts.Network = ns
opts.CNINetworks = cniNets