From 7ba68c2854cd6711997c9a68cbde7dda884763da Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Fri, 1 Apr 2022 08:04:37 +0200 Subject: [PATCH] If there is no image name, fail! fix #6 --- generator/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generator/main.go b/generator/main.go index d6382b9..d864457 100644 --- a/generator/main.go +++ b/generator/main.go @@ -158,6 +158,10 @@ func parseService(name string, s *compose.Service, linked map[string]*compose.Se // prepareContainer assigns image, command, env, and labels to a container. func prepareContainer(container *helm.Container, service *compose.Service, servicename string) { + // if there is no image name, this should fail! + if service.Image == "" { + log.Fatal(ICON_PACKAGE+" No image name for service ", servicename) + } container.Image = "{{ .Values." + servicename + ".image }}" container.Command = service.Command Values[servicename] = map[string]interface{}{