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

26 lines
711 B
YAML
Raw Normal View History

2024-01-10 02:16:55 +01:00
{{- if .Values.traefik.enabled }}
{{- range $port,$config := .Values.traefik.ports }}
2024-01-10 02:16:55 +01:00
---
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: {{ include "stalwart-mail.fullname" $ }}-{{ $port }}
spec:
entryPoints:
- {{ $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 }}
2024-01-10 02:16:55 +01:00
{{- end }}
{{- end }}{{/* end-if .enabled */}}