Use compose-go https://github.com/compose-spec/compose-go to make Katenary parsing compose file the official way. Add labels: - `volume-from` (with `same-pod`) to avoid volume repetition - `ignore` to ignore a service - `mapenv` (replaces the `env-to-service`) to map environment to helm variable (as a template string) - `secret-vars` declares variables as secret values More: - Now, environment (as secret vars) are set in values.yaml - Ingress has got annotations in values.yaml - Probes (liveness probe) are improved - fixed code to optimize - many others fixes about path, bad volume check, refactorisation, tests...
26 lines
603 B
Go
26 lines
603 B
Go
package helm
|
|
|
|
import "strings"
|
|
|
|
var NOTES = `
|
|
Congratulations,
|
|
|
|
Your application is now deployed. This may take a while to be up and responding.
|
|
|
|
__list__
|
|
`
|
|
|
|
// GenerateNotesFile generates the notes file for the helm chart.
|
|
func GenerateNotesFile(ingressess map[string]*Ingress) string {
|
|
|
|
list := make([]string, 0)
|
|
|
|
for name, ing := range ingressess {
|
|
for _, r := range ing.Spec.Rules {
|
|
list = append(list, "{{ if .Values."+name+".ingress.enabled -}}\n- "+name+" is accessible on : http://"+r.Host+"\n{{- end }}")
|
|
}
|
|
}
|
|
|
|
return strings.ReplaceAll(NOTES, "__list__", strings.Join(list, "\n"))
|
|
}
|