summaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-27 20:37:03 +0200
committerGitHub <noreply@github.com>2020-04-27 20:37:03 +0200
commit733c38028df9d8c0b0688a54ef948a21b6260f26 (patch)
treeea9d691a33291bc4dc635296283c9f5de3d315a3 /pkg/specgen
parentccf009d22e45e9a517b65619d6d46a8d40cb3328 (diff)
parent1803b28d8cae1fd6c5e2ea508911309251a1349a (diff)
downloadpodman-733c38028df9d8c0b0688a54ef948a21b6260f26.tar.gz
podman-733c38028df9d8c0b0688a54ef948a21b6260f26.tar.bz2
podman-733c38028df9d8c0b0688a54ef948a21b6260f26.zip
Merge pull request #5999 from giuseppe/fix-pod-infra-container
v2, podman: fix pod tests
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/namespaces.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/specgen/namespaces.go b/pkg/specgen/namespaces.go
index cee49ff51..f0161a793 100644
--- a/pkg/specgen/namespaces.go
+++ b/pkg/specgen/namespaces.go
@@ -159,6 +159,8 @@ func (n *Namespace) validate() error {
func ParseNamespace(ns string) (Namespace, error) {
toReturn := Namespace{}
switch {
+ case ns == "pod":
+ toReturn.NSMode = FromPod
case ns == "host":
toReturn.NSMode = Host
case ns == "private":
@@ -214,6 +216,8 @@ func ParseNetworkNamespace(ns string) (Namespace, []string, error) {
toReturn := Namespace{}
var cniNetworks []string
switch {
+ case ns == "pod":
+ toReturn.NSMode = FromPod
case ns == "bridge":
toReturn.NSMode = Bridge
case ns == "none":