fix(stalwart-mail): validate traefik port

This commit is contained in:
WrenIX 2024-06-11 15:35:53 +02:00
parent 451d130f6b
commit 7e3786c91b
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
3 changed files with 6 additions and 4 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)
icon: https://stalw.art/home/apple-touch-icon.png
type: application
version: 0.0.8
version: 0.0.9
# renovate: image=docker.io/stalwartlabs/mail-server
appVersion: "0.8.1"
maintainers:

View file

@ -2,7 +2,7 @@
= stalwart-mail
image::https://img.shields.io/badge/Version-0.0.8-informational?style=flat-square[Version: 0.0.8]
image::https://img.shields.io/badge/Version-0.0.9-informational?style=flat-square[Version: 0.0.9]
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]
== Maintainers

View file

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