2021-11-30 15:35:32 +01:00
|
|
|
package helm
|
|
|
|
|
|
|
|
import "strings"
|
|
|
|
|
|
|
|
var NOTES = `
|
|
|
|
Congratulations,
|
|
|
|
|
|
|
|
Your application is now deployed. This may take a while to be up and responding.
|
|
|
|
|
|
|
|
__list__
|
|
|
|
`
|
|
|
|
|
2022-05-08 09:55:25 +02:00
|
|
|
// GenerateNotesFile generates the notes file for the helm chart.
|
2021-12-05 09:05:48 +01:00
|
|
|
func GenerateNotesFile(ingressess map[string]*Ingress) string {
|
2021-11-30 15:35:32 +01:00
|
|
|
|
|
|
|
list := make([]string, 0)
|
|
|
|
|
|
|
|
for name, ing := range ingressess {
|
|
|
|
for _, r := range ing.Spec.Rules {
|
2021-12-01 13:59:41 +01:00
|
|
|
list = append(list, "{{ if .Values."+name+".ingress.enabled -}}\n- "+name+" is accessible on : http://"+r.Host+"\n{{- end }}")
|
2021-11-30 15:35:32 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return strings.ReplaceAll(NOTES, "__list__", strings.Join(list, "\n"))
|
|
|
|
}
|