fix(stalwart-mail): improve traefik ports

This commit is contained in:
WrenIX 2024-06-11 14:24:00 +02:00
parent d44afc59a8
commit f57d6d587a
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
4 changed files with 129 additions and 17 deletions

View file

@ -3,7 +3,7 @@ name: stalwart-mail
description: Helm Chart for Stalwart Mail Server - Secure & Modern All-in-One Mail Server (IMAP, JMAP, SMTP) description: Helm Chart for Stalwart Mail Server - Secure & Modern All-in-One Mail Server (IMAP, JMAP, SMTP)
icon: https://stalw.art/home/apple-touch-icon.png icon: https://stalw.art/home/apple-touch-icon.png
type: application type: application
version: 0.0.6 version: 0.0.7
# renovate: image=docker.io/stalwartlabs/mail-server # renovate: image=docker.io/stalwartlabs/mail-server
appVersion: "0.8.1" appVersion: "0.8.1"
maintainers: maintainers:

View file

@ -2,7 +2,7 @@
= stalwart-mail = stalwart-mail
image::https://img.shields.io/badge/Version-0.0.6-informational?style=flat-square[Version: 0.0.6] image::https://img.shields.io/badge/Version-0.0.7-informational?style=flat-square[Version: 0.0.7]
image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application] image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application]
image::https://img.shields.io/badge/AppVersion-0.8.1-informational?style=flat-square[AppVersion: 0.8.1] image::https://img.shields.io/badge/AppVersion-0.8.1-informational?style=flat-square[AppVersion: 0.8.1]
== Maintainers == Maintainers
@ -609,36 +609,121 @@ helm uninstall stalwart-mail-release
| `false` | `false`
| |
| traefik.ports.https | traefik.ports.https.entrypoint
| string | string
| `"websecure"` | `"websecure"`
| |
| traefik.ports.imaptls | traefik.ports.https.match
| string
| `nil`
|
| traefik.ports.https.passthroughTLS
| bool
| `true`
|
| traefik.ports.https.proxyProtocol
| bool
| `true`
|
| traefik.ports.imaptls.entrypoint
| string | string
| `"imaps"` | `"imaps"`
| |
| traefik.ports.pop3s | traefik.ports.imaptls.match
| string
| `nil`
|
| traefik.ports.imaptls.passthroughTLS
| bool
| `true`
|
| traefik.ports.imaptls.proxyProtocol
| bool
| `true`
|
| traefik.ports.pop3s.entrypoint
| string | string
| `"pop3s"` | `"pop3s"`
| |
| traefik.ports.sieve | traefik.ports.pop3s.match
| string
| `nil`
|
| traefik.ports.pop3s.passthroughTLS
| bool
| `true`
|
| traefik.ports.pop3s.proxyProtocol
| bool
| `true`
|
| traefik.ports.sieve.entrypoint
| string | string
| `"sieve"` | `"sieve"`
| |
| traefik.ports.smtp | traefik.ports.sieve.match
| string
| `nil`
|
| traefik.ports.sieve.passthroughTLS
| bool
| `true`
|
| traefik.ports.sieve.proxyProtocol
| bool
| `true`
|
| traefik.ports.smtp.entrypoint
| string | string
| `"smtp"` | `"smtp"`
| |
| traefik.ports.smtps | traefik.ports.smtp.match
| string
| `nil`
|
| traefik.ports.smtp.proxyProtocol
| bool
| `true`
|
| traefik.ports.smtps.entrypoint
| string | string
| `"smtps"` | `"smtps"`
| |
| traefik.ports.smtps.match
| string
| `nil`
|
| traefik.ports.smtps.passthroughTLS
| bool
| `true`
|
| traefik.ports.smtps.proxyProtocol
| bool
| `true`
|
| volumeMounts | volumeMounts
| list | list
| `[]` | `[]`

View file

@ -1,5 +1,5 @@
{{- if .Values.traefik.enabled }} {{- if .Values.traefik.enabled }}
{{- range $port,$entryport := .Values.traefik.ports }} {{- range $port,$config := .Values.traefik.ports }}
--- ---
apiVersion: traefik.io/v1alpha1 apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP kind: IngressRouteTCP
@ -7,15 +7,19 @@ metadata:
name: {{ include "stalwart-mail.fullname" $ }}-{{ $port }} name: {{ include "stalwart-mail.fullname" $ }}-{{ $port }}
spec: spec:
entryPoints: entryPoints:
- {{ $entryport }} - {{ $config.entrypoint }}
routes: routes:
- match: HostSNI(`{{ $.Values.traefik.host }}`) - match: {{ $config.match | default (printf "HostSNI(`%s`)" $.Values.traefik.host) | quote }}
services: services:
- name: {{ include "stalwart-mail.fullname" $ }} - name: {{ include "stalwart-mail.fullname" $ }}
port: {{ $port }} port: {{ $port }}
{{- if $config.proxyProtocol }}
proxyProtocol: proxyProtocol:
version: 2 version: 2
{{- end }}
{{- if $config.passthroughTLS }}
tls: tls:
passthrough: true passthrough: true
{{- end }} {{- end }}
{{- end }}
{{- end }}{{/* end-if .enabled */}} {{- end }}{{/* end-if .enabled */}}

View file

@ -184,12 +184,35 @@ ingress:
traefik: traefik:
enabled: false enabled: false
ports: ports:
smtp: smtp smtp:
smtps: smtps match:
imaptls: imaps entrypoint: smtp
pop3s: pop3s proxyProtocol: true
sieve: sieve smtps:
https: websecure match:
entrypoint: smtps
proxyProtocol: true
passthroughTLS: true
imaptls:
match:
entrypoint: imaps
proxyProtocol: true
passthroughTLS: true
pop3s:
match:
entrypoint: pop3s
proxyProtocol: true
passthroughTLS: true
sieve:
match:
entrypoint: sieve
proxyProtocol: true
passthroughTLS: true
https:
match:
entrypoint: websecure
proxyProtocol: true
passthroughTLS: true
certificate: certificate:
# -- not needed if certmanager is used # -- not needed if certmanager is used