From 4f59c2062e8ce82ad9a70aeebebc406d6cd09493 Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Sun, 25 Jan 2026 16:14:42 +0100 Subject: [PATCH] Add Stalwart --- apps/templates/stalwart-helm.yaml | 22 ++++++++++++++ stalwart/Chart.yaml | 5 ++++ stalwart/templates/deployment.yaml | 48 ++++++++++++++++++++++++++++++ stalwart/templates/service.yaml | 35 ++++++++++++++++++++++ stalwart/values.yaml | 25 ++++++++++++++++ 5 files changed, 135 insertions(+) create mode 100644 apps/templates/stalwart-helm.yaml create mode 100644 stalwart/Chart.yaml create mode 100644 stalwart/templates/deployment.yaml create mode 100644 stalwart/templates/service.yaml create mode 100644 stalwart/values.yaml diff --git a/apps/templates/stalwart-helm.yaml b/apps/templates/stalwart-helm.yaml new file mode 100644 index 0000000..b389060 --- /dev/null +++ b/apps/templates/stalwart-helm.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: stalwart + namespace: argocd +spec: + project: default + source: + repoURL: https://github.com/rubenhensen/k8scd.git + targetRevision: v0.1.0 + path: stalwart + destination: + server: https://kubernetes.default.svc + namespace: stalwart + syncPolicy: + automated: + selfHeal: true + prune: true + syncOptions: + - CreateNamespace=true + automated: + selfHeal: true diff --git a/stalwart/Chart.yaml b/stalwart/Chart.yaml new file mode 100644 index 0000000..3c4cc8b --- /dev/null +++ b/stalwart/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: stalwart +description: Helm chart for Stalwart +version: 0.1.0 +appVersion: "latest" diff --git a/stalwart/templates/deployment.yaml b/stalwart/templates/deployment.yaml new file mode 100644 index 0000000..f5803f2 --- /dev/null +++ b/stalwart/templates/deployment.yaml @@ -0,0 +1,48 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "stalwart.fullname" . }} + labels: + {{- include "stalwart.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "stalwart.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "stalwart.selectorLabels" . | nindent 8 }} + spec: + containers: + - name: stalwart + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + livenessProbe: + httpGet: + path: /healthz/live + port: 8080 + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz/ready + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 10 + ports: + - containerPort: 8080 + - containerPort: 443 + - containerPort: 25 + - containerPort: 587 + - containerPort: 465 + - containerPort: 143 + - containerPort: 993 + - containerPort: 4190 + volumeMounts: + - name: stalwart-volume + mountPath: {{ .Values.persistence.mountPath }} + volumes: + - name: stalwart-volume + persistentVolumeClaim: + claimName: {{ include "stalwart.fullname" . }} diff --git a/stalwart/templates/service.yaml b/stalwart/templates/service.yaml new file mode 100644 index 0000000..db60800 --- /dev/null +++ b/stalwart/templates/service.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "stalwart.fullname" . }} + labels: + {{- include "stalwart.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - name: http + port: 8080 + targetPort: 8080 + - name: https + port: 443 + targetPort: 443 + - name: smtp + port: 25 + targetPort: 25 + - name: submission + port: 587 + targetPort: 587 + - name: smtps + port: 465 + targetPort: 465 + - name: imap + port: 143 + targetPort: 143 + - name: imaps + port: 993 + targetPort: 993 + - name: sieve + port: 4190 + targetPort: 4190 + selector: + {{- include "stalwart.selectorLabels" . | nindent 4 }} diff --git a/stalwart/values.yaml b/stalwart/values.yaml new file mode 100644 index 0000000..939cc70 --- /dev/null +++ b/stalwart/values.yaml @@ -0,0 +1,25 @@ +image: + repository: stalwartlabs/stalwart + pullPolicy: IfNotPresent + tag: "latest" + +service: + type: NodePort + ports: + http: 8080 + https: 443 + smtp: 25 + submission: 587 + smtps: 465 + imap: 143 + imaps: 993 + sieve: 4190 + +persistence: + enabled: true + storageClass: "standard" + accessMode: ReadWriteOnce + size: 10Gi + mountPath: /opt/stalwart + +replicaCount: 1