feat: update traefik field for multiple hosts

This commit is contained in:
Loïc Kalbermatter 2024-06-10 15:49:20 +02:00
parent 6060312074
commit fc8252ee23
Signed by: PulseDev
GPG Key ID: 0516267FEC58F5F3
3 changed files with 7 additions and 4 deletions

View File

@ -41,6 +41,7 @@ Helm Chart for Stalwart Mail Server - Secure & Modern All-in-One Mail Server (IM
| service.ports.submission | int | `587` | |
| service.type | string | `"NodePort"` | |
| traefik.enabled | bool | `false` | |
| traefik.hosts | list | `[]` | |
| traefik.ports.http | string | `"websecure"` | |
| traefik.ports.imaps | string | `"imaps"` | |
| traefik.ports.smtps | string | `"smtps"` | |

View File

@ -9,13 +9,15 @@ spec:
entryPoints:
- {{ $entryport }}
routes:
- match: HostSNI(`{{ $.Values.traefik.host }}`)
{{- range $host := .Values.traefik.hosts }}
- match: HostSNI(`{{ $host }}`)
services:
- name: {{ include "stalwart-mail.fullname" $ }}
port: {{ $port }}
proxyProtocol:
version: 2
{{- end }}
tls:
passthrough: true
{{- end }}
{{- end }}{{/* end-if .enabled */}}
{{- end }}

View File

@ -34,7 +34,7 @@ ingress:
traefik:
enabled: false
#host: "mail.example.com"
hosts: []
ports:
http: websecure
imaps: imaps