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

namespace variables correctly

parent 245ef747
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,6 @@ metadata:
labels:
{{- include "common.variables.labels" . | nindent 4 }}
data:
{{- (include "common.variables.configmap.data" .) | nindent 2 }}
{{- (include "common.configmap.variables.data" .) | nindent 2 }}
---
{{- end }}
......@@ -20,13 +20,13 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Extra Ingress
Ingress
*/}}
{{/*
Extra Ingress Rules
Ingress Rules
*/}}
{{- define "common.variables.ingress.rules" -}}
{{- define "common.ingress.variables.rules" -}}
{{- $rules := list -}}
{{- range $name, $rule := .Values.rules -}}
{{- $rules = append $rules $rule -}}
......@@ -35,9 +35,9 @@ Extra Ingress Rules
{{- end }}
{{/*
Extra Ingress TLS
Ingress TLS
*/}}
{{- define "common.variables.ingress.tls" -}}
{{- define "common.ingress.variables.tls" -}}
{{- $tlsDefinitions := list -}}
{{- range $name, $tlsDefinition := .Values.tls -}}
{{- $tlsDefinitions = append $tlsDefinitions $tlsDefinition -}}
......@@ -52,7 +52,7 @@ Secret
{{/*
Secret data
*/}}
{{- define "common.variables.secret.data" -}}
{{- define "common.secret.variables.data" -}}
{{- $data := dict -}}
{{- range $key, $value := .Values.data -}}
{{- $data = merge $data (dict $key $value) -}}
......@@ -67,7 +67,7 @@ ConfigMap
{{/*
ConfigMap data
*/}}
{{- define "common.variables.configmap.data" -}}
{{- define "common.configmap.variables.data" -}}
{{- $data := dict -}}
{{- range $key, $value := .Values.data -}}
{{- $data = merge $data (dict $key $value) -}}
......@@ -83,7 +83,7 @@ Traefik
IngressRouteTCP
*/}}
{{- define "common.traefik.variables.ingressroutetcp.routes" -}}
{{- define "common.traefik.ingressroutetcp.variables.routes" -}}
{{- $routes := list -}}
{{- range $name, $route := .Values.routes -}}
{{- $routes = append $routes $route -}}
......@@ -95,7 +95,7 @@ IngressRouteTCP
IngressRoute
*/}}
{{- define "common.traefik.variables.ingressroute.routes" -}}
{{- define "common.traefik.ingressroute.variables.routes" -}}
{{- $routes := list -}}
{{- range $name, $route := .Values.routes -}}
{{- $routes = append $routes $route -}}
......@@ -107,7 +107,7 @@ IngressRoute
TLSStore
*/}}
{{- define "common.traefik.variables.tlsstore.certificates" -}}
{{- define "common.traefik.tlsstore.variables.certificates" -}}
{{- range $secretName := .Values.certificates -}}
- secretName: {{ $secretName }}
{{- end }}
......
......@@ -14,8 +14,8 @@ spec:
ingressClassName: {{ . | quote }}
{{- end }}
rules:
{{- (include "common.variables.ingress.rules" .) | nindent 4 }}
{{- (include "common.ingress.variables.rules" .) | nindent 4 }}
tls:
{{- (include "common.variables.ingress.tls" .) | nindent 4 }}
{{- (include "common.ingress.variables.tls" .) | nindent 4 }}
---
{{- end }}
......@@ -11,6 +11,6 @@ metadata:
{{- include "common.variables.labels" . | nindent 4 }}
type: {{ .Values.type | default "Opaque" }}
data:
{{- (include "common.variables.secret.data" .) | nindent 2 }}
{{- (include "common.secret.variables.data" .) | nindent 2 }}
---
{{- end }}
......@@ -16,7 +16,7 @@ spec:
{{- toYaml . | nindent 4 }}
{{- end }}
routes:
{{- (include "common.traefik.variables.ingressroutetcp.routes" .) | nindent 4 }}
{{- (include "common.traefik.ingressroute.variables.routes" .) | nindent 4 }}
{{- with .Values.tls }}
tls:
{{ toYaml . | nindent 4 }}
......
......@@ -15,7 +15,7 @@ spec:
{{- toYaml . | nindent 4}}
{{- end }}
routes:
{{- (include "common.traefik.variables.ingressroutetcp.routes" .) | nindent 4 }}
{{- (include "common.traefik.ingressroutetcp.variables.routes" .) | nindent 4 }}
{{- with .Values.tls }}
tls:
{{ toYaml . | nindent 4 }}
......
......@@ -16,6 +16,6 @@ spec:
secretName: {{ toYaml . }}
{{- end }}
certificates:
{{- include "common.traefik.variables.tlsstore.certificates" . | nindent 4 }}
{{- include "common.traefik.tlsstore.variables.certificates" . | nindent 4 }}
---
{{- 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