A big commit to fix more things, see details
- ingress can now have annotations - configmaps are better named and there is a label to know from where the content is taken - fixed bad "nil" pointer checks - we force to not resolve paths from compose file, this should be a problem when we call the compose file from outside. So, TODO: check this! - the "project" label is now the Chart Name, not a static string - minor fixes
This commit is contained in:
@@ -59,6 +59,15 @@ func BuildIngress(ingress *helm.Ingress, name, templatesDir string) {
|
||||
l = apiVersion
|
||||
}
|
||||
|
||||
// add annotations linked to the Values
|
||||
if strings.Contains(l, "annotations:") {
|
||||
n := CountSpaces(l) + IndentSize
|
||||
l += "\n" + strings.Repeat(" ", n) + "{{- range $k, $v := .Values.__name__.ingress.annotations }}\n"
|
||||
l += strings.Repeat(" ", n) + "{{ $k }}: {{ $v }}\n"
|
||||
l += strings.Repeat(" ", n) + "{{- end }}"
|
||||
l = strings.ReplaceAll(l, "__name__", name)
|
||||
}
|
||||
|
||||
// pathTyype is ony for 1.19+
|
||||
if strings.Contains(l, "pathType:") {
|
||||
n := CountSpaces(l)
|
||||
|
Reference in New Issue
Block a user