summaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorPeter Hunt <pehunt@redhat.com>2020-09-10 17:22:53 -0400
committerPeter Hunt <pehunt@redhat.com>2020-09-10 17:22:55 -0400
commitb80b95eea0c2f32de6101e558ce5314e1bd08c25 (patch)
tree6f018ff8ddb629b7a976b574f8ca67303ec2e9e1 /pkg/domain/infra
parent96bc5eb4b77d00f59a342b7af1f6f3ecd35772a5 (diff)
downloadpodman-b80b95eea0c2f32de6101e558ce5314e1bd08c25.tar.gz
podman-b80b95eea0c2f32de6101e558ce5314e1bd08c25.tar.bz2
podman-b80b95eea0c2f32de6101e558ce5314e1bd08c25.zip
play/generate: support shareProcessNamespace
this is an option that allows a user to specify whether to share PID namespace in the pod for play kube and generate kube associated test added Signed-off-by: Peter Hunt <pehunt@redhat.com>
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/abi/play.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index 31ad51672..8b583fd3d 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -132,7 +132,11 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
libpod.WithInfraContainer(),
libpod.WithPodName(podName),
}
- // TODO for now we just used the default kernel namespaces; we need to add/subtract this from yaml
+ // TODO we only configure Process namespace. We also need to account for Host{IPC,Network,PID}
+ // which is not currently possible with pod create
+ if podYAML.Spec.ShareProcessNamespace != nil && *podYAML.Spec.ShareProcessNamespace {
+ podOptions = append(podOptions, libpod.WithPodPID())
+ }
hostname := podYAML.Spec.Hostname
if hostname == "" {