summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-11 05:56:35 -0400
committerGitHub <noreply@github.com>2020-09-11 05:56:35 -0400
commitd1798d038376bf494f19b1531b9e0450592b24b9 (patch)
tree3b57e8f2834975ce0a3190c4670dfca781bbc73a /libpod
parente59c3ce1c529eaa26360cf69264bd5c24ee45c6c (diff)
parentb80b95eea0c2f32de6101e558ce5314e1bd08c25 (diff)
downloadpodman-d1798d038376bf494f19b1531b9e0450592b24b9.tar.gz
podman-d1798d038376bf494f19b1531b9e0450592b24b9.tar.bz2
podman-d1798d038376bf494f19b1531b9e0450592b24b9.zip
Merge pull request #7591 from haircommander/play-kube-process-namespace
play/generate: support shareProcessNamespace
Diffstat (limited to 'libpod')
-rw-r--r--libpod/kube.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/kube.go b/libpod/kube.go
index 864bc78c7..9d5cbe68b 100644
--- a/libpod/kube.go
+++ b/libpod/kube.go
@@ -69,12 +69,20 @@ func (p *Pod) GenerateForKube() (*v1.Pod, []v1.ServicePort, error) {
return nil, servicePorts, err
}
servicePorts = containerPortsToServicePorts(ports)
+
}
pod, err := p.podWithContainers(allContainers, ports)
if err != nil {
return nil, servicePorts, err
}
pod.Spec.HostAliases = extraHost
+
+ if p.SharesPID() {
+ // unfortunately, go doesn't have a nice way to specify a pointer to a bool
+ b := true
+ pod.Spec.ShareProcessNamespace = &b
+ }
+
return pod, servicePorts, nil
}