From c151f1ca35441056200fadf43744d31856a11e72 Mon Sep 17 00:00:00 2001 From: dogisgreat Date: Sun, 27 Oct 2024 13:01:18 -0400 Subject: [PATCH] bug: fix named volume detection logic --- pkg/transformer/kubernetes/kubernetes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/transformer/kubernetes/kubernetes.go b/pkg/transformer/kubernetes/kubernetes.go index 72881833b..fcf23fc13 100644 --- a/pkg/transformer/kubernetes/kubernetes.go +++ b/pkg/transformer/kubernetes/kubernetes.go @@ -960,7 +960,7 @@ func (k *Kubernetes) ConfigVolumes(name string, service kobject.ServiceConfig) ( // check if ro/rw mode is defined, default rw readonly := len(volume.Mode) > 0 && (volume.Mode == "ro" || volume.Mode == "rox") mountHost := volume.Host - if mountHost == "" { + if volume.VolumeName == "" && mountHost == "" { mountHost = volume.MountPath } // return useconfigmap and readonly,