diff --git a/common/templates/_helpers.tpl b/common/templates/_helpers.tpl index 9104e38497f1d507a7cfdefc1171281e036e9bbe..2804f87d3784d45a740daba5430f6c79545f3b95 100644 --- a/common/templates/_helpers.tpl +++ b/common/templates/_helpers.tpl @@ -60,6 +60,10 @@ Secret data {{- toYaml $data -}} {{- end }} +{{/* +ConfigMap +*/}} + {{/* ConfigMap data */}} @@ -70,3 +74,19 @@ ConfigMap data {{- end }} {{- toYaml $data -}} {{- end }} + +{{/* +Traefik +*/}} + +{{/* +IngressRouteTCP +*/}} + +{{- define "common.traefik.variables.ingressroutetcp.routes" -}} +{{- $routes := list -}} +{{- range $name, $route := .Values.routes -}} + {{- $routes = append $routes $route -}} +{{- end }} +{{- toYaml $routes -}} +{{- end }} diff --git a/common/templates/traefik/_ingressroutetcp.tpl b/common/templates/traefik/_ingressroutetcp.tpl index 3e52a5079acfd2b66ead717030e38f613e7957f7..a2186c2452227a8a7494462f52741956aa1a44b4 100644 --- a/common/templates/traefik/_ingressroutetcp.tpl +++ b/common/templates/traefik/_ingressroutetcp.tpl @@ -14,10 +14,8 @@ spec: entryPoints: {{- toYaml . | nindent 4}} {{- end }} - {{- with .Values.routes }} routes: - {{- toYaml . | nindent 4 }} - {{- end }} + {{- (include "common.traefik.variables.ingressroutetcp.routes" .) | nindent 4 }} {{- with .Values.tls }} tls: {{ toYaml . | nindent 4 }}