mirror of
https://github.com/containers/podman.git
synced 2025-10-16 18:53:19 +08:00
kube: record infra user namespace
if there is an annotation that specifies the user namespace for the infra container, then make sure it is used for the entire pod. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -513,6 +513,10 @@ func (p *Pod) podWithContainers(ctx context.Context, containers []*Container, po
|
||||
|
||||
for _, ctr := range containers {
|
||||
if ctr.IsInfra() {
|
||||
// If there is an user namespace for the infra container, then register it for the entire pod.
|
||||
if v, found := ctr.config.Spec.Annotations[define.UserNsAnnotation]; found {
|
||||
podAnnotations[define.UserNsAnnotation] = v
|
||||
}
|
||||
_, _, infraDNS, _, err := containerToV1Container(ctx, ctr, getService)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user