summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-13 19:42:14 +0200
committerGitHub <noreply@github.com>2021-10-13 19:42:14 +0200
commit9f1452cbb51bbca221c307e6da60af51a65489cd (patch)
tree60fa64cb7f168d3ba4badcdf1b9c3b3c2d4229cb /libpod
parenta235f43ac05ad30aeb6f85ba79755d5529d49e1b (diff)
parent4631f5b283b95abb30b91a858517609d3fb2022c (diff)
downloadpodman-9f1452cbb51bbca221c307e6da60af51a65489cd.tar.gz
podman-9f1452cbb51bbca221c307e6da60af51a65489cd.tar.bz2
podman-9f1452cbb51bbca221c307e6da60af51a65489cd.zip
Merge pull request #11944 from cdoern/kubeEmit
Kube Gen run as user/group issues
Diffstat (limited to 'libpod')
-rw-r--r--libpod/kube.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/kube.go b/libpod/kube.go
index eb7743886..43acd856d 100644
--- a/libpod/kube.go
+++ b/libpod/kube.go
@@ -485,6 +485,10 @@ func containerToV1Container(ctx context.Context, c *Container) (v1.Container, []
kubeContainer.Command = nil
}
+ if imgData.User == c.User() {
+ kubeSec.RunAsGroup, kubeSec.RunAsUser = nil, nil
+ }
+
kubeContainer.WorkingDir = c.WorkingDir()
kubeContainer.Ports = ports
// This should not be applicable