If there is no image name, fail!

fix #6
This commit is contained in:
2022-04-01 08:04:37 +02:00
parent 1dd8fef4b3
commit 7ba68c2854

View File

@@ -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. // prepareContainer assigns image, command, env, and labels to a container.
func prepareContainer(container *helm.Container, service *compose.Service, servicename string) { 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.Image = "{{ .Values." + servicename + ".image }}"
container.Command = service.Command container.Command = service.Command
Values[servicename] = map[string]interface{}{ Values[servicename] = map[string]interface{}{