helm-charts/stalwart-mail/templates/traefik.yaml

28 lines
850 B
YAML
Raw Permalink Normal View History

2024-01-10 02:16:55 +01:00
{{- if .Values.traefik.enabled }}
{{- range $port,$config := .Values.traefik.ports }}
{{- if $config }}
2024-01-10 02:16:55 +01:00
---
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: {{ include "stalwart-mail.fullname" $ }}-{{ $port }}
spec:
entryPoints:
- {{ required (printf "traefik.ports.%s.entrypoint is required" $port) $config.entrypoint }}
2024-01-10 02:16:55 +01:00
routes:
- match: {{ $config.match | default (printf "HostSNI(`%s`)" $.Values.traefik.host) | quote }}
2024-01-10 02:16:55 +01:00
services:
- name: {{ include "stalwart-mail.fullname" $ }}
port: {{ $port }}
{{- if $config.proxyProtocol }}
2024-01-10 02:16:55 +01:00
proxyProtocol:
version: 2
{{- end }}
{{- if $config.passthroughTLS }}
2024-01-10 02:16:55 +01:00
tls:
passthrough: true
{{- end }}
{{- end }}{{/* if config exists*/}}
{{- end }}{{/* end-range */}}
2024-01-10 02:16:55 +01:00
{{- end }}{{/* end-if .enabled */}}