diff options
author | Urvashi Mohnani <umohnani@redhat.com> | 2022-09-01 11:50:19 -0400 |
---|---|---|
committer | Urvashi Mohnani <umohnani@redhat.com> | 2022-09-01 11:51:46 -0400 |
commit | 4a1acccf965362eb315b38f9b2cb35a8564aa173 (patch) | |
tree | d168dba28517086885046826a16c8fba78d15e07 /libpod | |
parent | 0085fbb488eec30e71e6cced6a06dbdb134e32a6 (diff) | |
download | podman-4a1acccf965362eb315b38f9b2cb35a8564aa173.tar.gz podman-4a1acccf965362eb315b38f9b2cb35a8564aa173.tar.bz2 podman-4a1acccf965362eb315b38f9b2cb35a8564aa173.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')
-rw-r--r-- | libpod/define/config.go | 2 | ||||
-rw-r--r-- | libpod/kube.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libpod/define/config.go b/libpod/define/config.go index 34c1a675d..1fad5cc9a 100644 --- a/libpod/define/config.go +++ b/libpod/define/config.go @@ -85,4 +85,4 @@ const PassthroughLogging = "passthrough" const RLimitDefaultValue = uint64(1048576) // BindMountPrefix distinguishes its annotations from others -const BindMountPrefix = "bind-mount-options:" +const BindMountPrefix = "bind-mount-options" diff --git a/libpod/kube.go b/libpod/kube.go index a70782d69..d4414aabd 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 @@ -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) |