mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
Fix bind-mount-option annotation in gen/play kube
The format used for setting the bind-mount-options annotations in the kube yaml was incorrect and caused k8s to throw an error when trying to play the generated kube yaml. Fix the annotation format to match the rules of k8s. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
@ -385,7 +385,7 @@ func (p *Pod) podWithContainers(ctx context.Context, containers []*Container, po
|
||||
return nil, err
|
||||
}
|
||||
for k, v := range annotations {
|
||||
podAnnotations[define.BindMountPrefix+k] = TruncateKubeAnnotation(v)
|
||||
podAnnotations[define.BindMountPrefix] = TruncateKubeAnnotation(k + ":" + v)
|
||||
}
|
||||
// Since port bindings for the pod are handled by the
|
||||
// infra container, wipe them here only if we are sharing the net namespace
|
||||
@ -529,7 +529,7 @@ func simplePodWithV1Containers(ctx context.Context, ctrs []*Container) (*v1.Pod,
|
||||
return nil, err
|
||||
}
|
||||
for k, v := range annotations {
|
||||
kubeAnnotations[define.BindMountPrefix+k] = TruncateKubeAnnotation(v)
|
||||
kubeAnnotations[define.BindMountPrefix] = TruncateKubeAnnotation(k + ":" + v)
|
||||
}
|
||||
if isInit {
|
||||
kubeInitCtrs = append(kubeInitCtrs, kubeCtr)
|
||||
|
Reference in New Issue
Block a user