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

add traefik tls store template

parent cfe096c4
No related branches found
No related tags found
No related merge requests found
Pipeline #7756 passed with stages
in 42 seconds
......@@ -102,3 +102,13 @@ IngressRoute
{{- end }}
{{- toYaml $routes -}}
{{- end }}
{{/*
TLSStore
*/}}
{{- define "common.traefik.variables.tlsstore.certificates" -}}
{{- range $secretName := .Values.certificates -}}
- secretName: {{ $secretName }}
{{- end }}
{{- end }}
# https://github.com/traefik/traefik/blob/master/docs/content/routing/providers/kubernetes-crd.md#kind-tlsstore
{{- define "common.traefik.tlsstore" }}
apiVersion: {{ .Values.apiVersion | default "traefik.io/v1alpha1" }}
kind: TLSStore
metadata:
name: {{ .Values.name | default "tlsstore" }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "common.variables.labels" . | nindent 4 }}
spec:
{{- with .Values.defaultCertificateSecretName }}
defaultCertificate:
secretName: {{ toYaml . }}
{{- end }}
certificates:
{{- include "common.traefik.variables.tlsstore.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