From 48872f3d627ad1526a7826ab5e316e17d8958bf4 Mon Sep 17 00:00:00 2001 From: Tommy Date: Mon, 24 Jun 2024 21:09:06 +0200 Subject: [PATCH] feat(stalwart-mail): adjustments for chart Change of format required for configmap and add extra secret env --- charts/stalwart-mail/Chart.yaml | 2 +- charts/stalwart-mail/templates/deployment.yaml | 15 +++++++++------ charts/stalwart-mail/values.yaml | 4 +--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/charts/stalwart-mail/Chart.yaml b/charts/stalwart-mail/Chart.yaml index 40c7520..013a192 100644 --- a/charts/stalwart-mail/Chart.yaml +++ b/charts/stalwart-mail/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: stalwart-mail description: Stalwart is a JMAP, IMAP4 and SMTP server -version: 0.1.9 +version: 0.2.0 appVersion: 0.8.1 maintainers: - name: Tommy Skaug diff --git a/charts/stalwart-mail/templates/deployment.yaml b/charts/stalwart-mail/templates/deployment.yaml index c053a10..15fd60d 100644 --- a/charts/stalwart-mail/templates/deployment.yaml +++ b/charts/stalwart-mail/templates/deployment.yaml @@ -19,7 +19,7 @@ spec: - name: stalwart-mail image: "{{ .Values.image.repository }}:v{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["sh", "-c", "cp /config/stalwart-mail.conf /etc/stalwart-mail-rw.conf && /usr/local/bin/stalwart-mail --config /etc/stalwart-mail-rw.conf"] + command: ["sh", "-c", "cp /etc/stalwart-mail.conf /etc/stalwart-mail-rw.conf && /usr/local/bin/stalwart-mail --config /etc/stalwart-mail-rw.conf"] ports: - containerPort: 8080 - containerPort: 443 @@ -80,11 +80,17 @@ spec: secretKeyRef: name: {{ .Values.existingSecret }} key: STALWART_DKIM_ED_KEY + {{- if .Values.extraEnvSecret }} + envFrom: + - secretRef: + name: {{ .Values.extraEnvSecret }} + {{ end }} volumeMounts: - name: stalwart-data mountPath: /data - name: stalwart-conf - mountPath: /config + subPath: stalwart-mail.conf + mountPath: /etc/stalwart-mail.conf readOnly: true volumes: - name: stalwart-data @@ -92,7 +98,4 @@ spec: claimName: {{ include "stalwart-mail.fullname" . }} - name: stalwart-conf configMap: - name: {{ .Values.existingConfigMap }} - items: - - key: configuration.yaml - path: stalwart-mail.conf \ No newline at end of file + name: {{ .Values.existingConfigMap }} \ No newline at end of file diff --git a/charts/stalwart-mail/values.yaml b/charts/stalwart-mail/values.yaml index 7602275..6f38c60 100644 --- a/charts/stalwart-mail/values.yaml +++ b/charts/stalwart-mail/values.yaml @@ -1,7 +1,5 @@ -config: - domain: 252.no - existingSecret: stalwart-mail-secret +extraEnvSecret: stalwart-mail-extraenv-secret existingConfigMap: stalwart-mail-config tlsSecret: stalwart-mail-tls