Skip to content
Snippets Groups Projects
Commit cfe096c4 authored by Andri Joos's avatar Andri Joos :blush:
Browse files

make traefik ingressroute routes a dict

parent 118bc3ad
No related branches found
No related tags found
No related merge requests found
Pipeline #7754 passed with stages
in 37 seconds
...@@ -90,3 +90,15 @@ IngressRouteTCP ...@@ -90,3 +90,15 @@ IngressRouteTCP
{{- end }} {{- end }}
{{- toYaml $routes -}} {{- toYaml $routes -}}
{{- end }} {{- end }}
{{/*
IngressRoute
*/}}
{{- define "common.traefik.variables.ingressroute.routes" -}}
{{- $routes := list -}}
{{- range $name, $route := .Values.routes -}}
{{- $routes = append $routes $route -}}
{{- end }}
{{- toYaml $routes -}}
{{- end }}
...@@ -15,12 +15,11 @@ spec: ...@@ -15,12 +15,11 @@ spec:
entryPoints: entryPoints:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- with .Values.routes }}
routes: routes:
{{- toYaml . | nindent 4 }} {{- (include "common.traefik.variables.ingressroutetcp.routes" .) | nindent 4 }}
{{- end }}
{{- with .Values.tls }} {{- with .Values.tls }}
tls: tls:
{{- toYaml . | nindent 4 }} {{ toYaml . | nindent 4 }}
{{- end }} {{- end }}
---
{{- end }} {{- end }}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment