From c9bdd1b718be87eed225b744879a32bf199fe994 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Tue, 5 Apr 2022 09:33:49 +0200 Subject: [PATCH] Fixup not bound volumes --- generator/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/generator/main.go b/generator/main.go index b181f62..beb6d21 100644 --- a/generator/main.go +++ b/generator/main.go @@ -312,6 +312,13 @@ func prepareVolumes(deployment, name string, s types.ServiceConfig, container *h volname := vol.Source volepath := vol.Target + if volname == "" { + logger.ActivateColors = true + logger.Yellowf("Warning, volume source to %s is empty for %s -- skipping\n", volepath, name) + logger.ActivateColors = false + continue + } + isCM := false for _, cmVol := range configMapsVolumes { cmVol = strings.TrimSpace(cmVol)