mirror of https://github.com/containers/podman.git
Merge pull request #11944 from cdoern/kubeEmit
Kube Gen run as user/group issues
This commit is contained in:
commit
9f1452cbb5
|
@ -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
|
||||
|
|
|
@ -942,7 +942,7 @@ USER test1`
|
|||
pod := new(v1.Pod)
|
||||
err = yaml.Unmarshal(kube.Out.Contents(), pod)
|
||||
Expect(err).To(BeNil())
|
||||
Expect(*pod.Spec.Containers[0].SecurityContext.RunAsUser).To(Equal(int64(10001)))
|
||||
Expect(pod.Spec.Containers[0].SecurityContext.RunAsUser).To(BeNil())
|
||||
})
|
||||
|
||||
It("podman generate kube on named volume", func() {
|
||||
|
|
Loading…
Reference in New Issue