From fa2590a97a41c1379b33cfcd049566a8c33c8e2b Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 11 Jul 2024 16:13:11 +0200 Subject: [PATCH] play: handle 'private' as 'auto' currently there is no way to specify the mappings, so at least treat a private user namespace as "auto". Signed-off-by: Giuseppe Scrivano --- pkg/domain/infra/abi/play.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go index a4fb9af9ba..6374f212ba 100644 --- a/pkg/domain/infra/abi/play.go +++ b/pkg/domain/infra/abi/play.go @@ -610,6 +610,10 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY } else { options.Userns = "host" } + // FIXME: how to deal with explicit mappings? + if options.Userns == "private" { + options.Userns = "auto" + } } else if podYAML.Spec.HostUsers != nil { logrus.Info("overriding the user namespace mode in the pod spec") }