2024-01-10 02:16:55 +01:00
|
|
|
{{- if .Values.traefik.enabled }}
|
2024-06-11 14:24:00 +02:00
|
|
|
{{- range $port,$config := .Values.traefik.ports }}
|
2024-06-11 15:35:53 +02:00
|
|
|
{{- 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:
|
2024-06-11 15:35:53 +02:00
|
|
|
- {{ required (printf "traefik.ports.%s.entrypoint is required" $port) $config.entrypoint }}
|
2024-01-10 02:16:55 +01:00
|
|
|
routes:
|
2024-06-11 14:24:00 +02:00
|
|
|
- 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" $ }}
|
2024-03-09 10:09:48 +00:00
|
|
|
port: {{ $port }}
|
2024-06-11 14:24:00 +02:00
|
|
|
{{- if $config.proxyProtocol }}
|
2024-01-10 02:16:55 +01:00
|
|
|
proxyProtocol:
|
|
|
|
version: 2
|
2024-06-11 14:24:00 +02:00
|
|
|
{{- end }}
|
|
|
|
{{- if $config.passthroughTLS }}
|
2024-01-10 02:16:55 +01:00
|
|
|
tls:
|
|
|
|
passthrough: true
|
2024-06-11 14:24:00 +02:00
|
|
|
{{- end }}
|
2024-06-11 15:35:53 +02:00
|
|
|
{{- end }}{{/* if config exists*/}}
|
|
|
|
{{- end }}{{/* end-range */}}
|
2024-01-10 02:16:55 +01:00
|
|
|
{{- end }}{{/* end-if .enabled */}}
|