From 7e3786c91bcb0f62c9034fbfd28ba79a4baf6b24 Mon Sep 17 00:00:00 2001 From: WrenIX Date: Tue, 11 Jun 2024 15:35:53 +0200 Subject: [PATCH] fix(stalwart-mail): validate traefik port --- stalwart-mail/Chart.yaml | 2 +- stalwart-mail/README.adoc | 2 +- stalwart-mail/templates/traefik.yaml | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/stalwart-mail/Chart.yaml b/stalwart-mail/Chart.yaml index 0fb075d..dc25225 100644 --- a/stalwart-mail/Chart.yaml +++ b/stalwart-mail/Chart.yaml @@ -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: diff --git a/stalwart-mail/README.adoc b/stalwart-mail/README.adoc index e698f30..399ec1c 100644 --- a/stalwart-mail/README.adoc +++ b/stalwart-mail/README.adoc @@ -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 diff --git a/stalwart-mail/templates/traefik.yaml b/stalwart-mail/templates/traefik.yaml index 3f682f0..ff32b51 100644 --- a/stalwart-mail/templates/traefik.yaml +++ b/stalwart-mail/templates/traefik.yaml @@ -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 */}}