From c1de5930749920099f19ba26ebc3c20453b6ecca Mon Sep 17 00:00:00 2001 From: Bianco95 Date: Tue, 11 Jun 2024 16:35:35 +0200 Subject: [PATCH] minor --- pkg/docker/Create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/docker/Create.go b/pkg/docker/Create.go index bf68e41..e836a64 100644 --- a/pkg/docker/Create.go +++ b/pkg/docker/Create.go @@ -165,7 +165,7 @@ func (h *SidecarHandler) CreateHandler(w http.ResponseWriter, r *http.Request) { envVars += " -v " + pathsOfVolumes[volumeMount.Name] + ":" + volumeMount.MountPath + ":ro" } else { // if it is Bidirectional, add :shared to the volume - if *volumeMount.MountPropagation == v1.MountPropagationBidirectional { + if volumeMount.MountPropagation != nil && *volumeMount.MountPropagation == v1.MountPropagationBidirectional { envVars += " -v " + pathsOfVolumes[volumeMount.Name] + ":" + volumeMount.MountPath + ":shared" } else { envVars += " -v " + pathsOfVolumes[volumeMount.Name] + ":" + volumeMount.MountPath