Files
k8scd/stalwart/templates/deployment.yaml
T
2026-01-25 23:05:56 +01:00

76 lines
2.2 KiB
YAML

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:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
labels:
{{- include "stalwart.selectorLabels" . | nindent 8 }}
spec:
hostname: mail
subdomain: hensen-io
containers:
- name: stalwart
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: STALWART_ADMIN_USER
valueFrom:
secretKeyRef:
name: {{ include "stalwart.fullname" . }}-admin
key: user
- name: STALWART_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "stalwart.fullname" . }}-admin
key: pw
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
hostPort: 25
- containerPort: 587
hostPort: 587
- containerPort: 465
hostPort: 465
- containerPort: 143
hostPort: 143
- containerPort: 993
hostPort: 993
- containerPort: 4190
hostPort: 4190
volumeMounts:
- name: stalwart-volume
mountPath: {{ .Values.persistence.mountPath }}
- name: config
mountPath: /opt/stalwart/etc/config.toml
subPath: config.toml
volumes:
- name: stalwart-volume
persistentVolumeClaim:
claimName: {{ include "stalwart.fullname" . }}
- name: config
configMap:
name: {{ include "stalwart.fullname" . }}-config