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 - name: SMTP2GO_USER valueFrom: secretKeyRef: name: {{ include "stalwart.fullname" . }}-smtp2go key: user - name: SMTP2GO_PASSWORD valueFrom: secretKeyRef: name: {{ include "stalwart.fullname" . }}-smtp2go 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 - name: tls-certs mountPath: /opt/stalwart/certs readOnly: true volumes: - name: stalwart-volume persistentVolumeClaim: claimName: {{ include "stalwart.fullname" . }} - name: config configMap: name: {{ include "stalwart.fullname" . }}-config - name: tls-certs secret: secretName: {{ .Values.tls.secretName }}