summaryrefslogtreecommitdiff
path: root/libpod/kube.go
diff options
context:
space:
mode:
authorUrvashi Mohnani <umohnani@redhat.com>2022-09-01 11:50:19 -0400
committerMatthew Heon <mheon@redhat.com>2022-09-06 15:05:50 -0400
commit48a02aa1c02ddeffd16b3c19ccf9aa23c482e82a (patch)
tree2f232a99f0f2a3aa2eac5e698322a8e9a757e0e9 /libpod/kube.go
parent7bb7908efaea76e9497a0c914fb29b0a3cdd5fff (diff)
downloadpodman-48a02aa1c02ddeffd16b3c19ccf9aa23c482e82a.tar.gz
podman-48a02aa1c02ddeffd16b3c19ccf9aa23c482e82a.tar.bz2
podman-48a02aa1c02ddeffd16b3c19ccf9aa23c482e82a.zip
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>
Diffstat (limited to 'libpod/kube.go')
-rw-r--r--libpod/kube.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/kube.go b/libpod/kube.go
index a0fb52973..98d1106b7 100644
--- a/libpod/kube.go
+++ b/libpod/kube.go
@@ -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
@@ -526,7 +526,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)