mirror of
https://github.com/containers/podman.git
synced 2025-06-28 06:18:57 +08:00
Kube Gen run as user/group issues
Removed the inclusion of RunAsUser or RunAsGroup unless a container is run with the --user flag. When building from an image the user will be pulled from there anyway resolves #11914 Signed-off-by: cdoern <cdoern@redhat.com>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user