From db168c91c9a7d47bb43491f7b63616678380d9eb Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Thu, 24 Oct 2024 17:21:04 +0200 Subject: [PATCH] fix(generation): use tpl in note for hostnames The value in hostname in values file can be a templated string. So, we should execute the content. --- generator/extrafiles/notes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/extrafiles/notes.go b/generator/extrafiles/notes.go index c2662e5..2fd6e12 100644 --- a/generator/extrafiles/notes.go +++ b/generator/extrafiles/notes.go @@ -15,7 +15,7 @@ func NotesFile(services []string) string { ingresses := make([]string, len(services)) for i, service := range services { condition := fmt.Sprintf(`{{- if and .Values.%[1]s.ingress .Values.%[1]s.ingress.enabled }}`, service) - line := fmt.Sprintf(`{{- $count = add1 $count -}}{{- $listOfURL = printf "%%s\n- http://%%s" $listOfURL .Values.%s.ingress.host -}}`, service) + line := fmt.Sprintf(`{{- $count = add1 $count -}}{{- $listOfURL = printf "%%s\n- http://%%s" $listOfURL (tpl .Values.%s.ingress.host .) -}}`, service) ingresses[i] = fmt.Sprintf("%s\n%s\n{{- end }}", condition, line) }