From 221b1add74e17ded10e8f2f832a53065578aa264 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 1 Dec 2020 16:23:40 -0500 Subject: Add support for pod inside of user namespace. Add the --userns flag to podman pod create and keep track of the userns setting that pod was created with so that all containers created within the pod will inherit that userns setting. Specifically we need to be able to launch a pod with --userns=keep-id Signed-off-by: Daniel J Walsh Signed-off-by: Urvashi Mohnani --- pkg/specgen/podspecgen.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/specgen/podspecgen.go') diff --git a/pkg/specgen/podspecgen.go b/pkg/specgen/podspecgen.go index 02237afe9..893ebf675 100644 --- a/pkg/specgen/podspecgen.go +++ b/pkg/specgen/podspecgen.go @@ -67,6 +67,10 @@ type PodBasicConfig struct { // Optional (defaults to private if unset). This sets the PID namespace of the infra container // This configuration will then be shared with the entire pod if PID namespace sharing is enabled via --share Pid Namespace `json:"pid,omitempty:"` + // Userns is used to indicate which kind of Usernamespace to enter. + // Any containers created within the pod will inherit the pod's userns settings. + // Optional + Userns Namespace `json:"userns,omitempty"` } // PodNetworkConfig contains networking configuration for a pod. -- cgit v1.2.3-54-g00ecf