| giolekva | 75ee271 | 2021-11-26 13:57:12 +0400 | [diff] [blame] | 1 | apiVersion: apps/v1 |
| 2 | kind: Deployment |
| 3 | metadata: |
| 4 | name: maddy |
| 5 | namespace: {{ .Release.Namespace }} |
| 6 | spec: |
| 7 | selector: |
| 8 | matchLabels: |
| 9 | app: maddy |
| 10 | replicas: 1 |
| 11 | template: |
| 12 | metadata: |
| 13 | labels: |
| 14 | app: maddy |
| giolekva | ee3a57b | 2021-12-01 16:18:23 +0400 | [diff] [blame] | 15 | annotations: |
| 16 | checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }} |
| giolekva | 75ee271 | 2021-11-26 13:57:12 +0400 | [diff] [blame] | 17 | spec: |
| giolekva | 75ee271 | 2021-11-26 13:57:12 +0400 | [diff] [blame] | 18 | volumes: |
| 19 | - name: config |
| 20 | configMap: |
| 21 | name: maddy |
| 22 | - name: certs |
| 23 | secret: |
| giolekva | ee3a57b | 2021-12-01 16:18:23 +0400 | [diff] [blame] | 24 | secretName: cert-{{ .Values.domains.primary.mx }} |
| giolekva | 75ee271 | 2021-11-26 13:57:12 +0400 | [diff] [blame] | 25 | - name: data |
| 26 | persistentVolumeClaim: |
| 27 | claimName: data |
| 28 | containers: |
| 29 | - name: maddy |
| 30 | image: giolekva/maddy-auth-smtp:v0.4.4 |
| 31 | imagePullPolicy: Always |
| 32 | ports: |
| 33 | - name: imap |
| 34 | containerPort: 143 |
| 35 | protocol: TCP |
| 36 | - name: imaps |
| 37 | containerPort: 993 |
| 38 | protocol: TCP |
| 39 | - name: smtp |
| 40 | containerPort: 25 |
| 41 | protocol: TCP |
| 42 | - name: smtps |
| 43 | containerPort: 465 |
| 44 | protocol: TCP |
| 45 | - name: submission |
| 46 | containerPort: 587 |
| 47 | protocol: TCP |
| 48 | command: |
| 49 | - maddy |
| 50 | - -config |
| 51 | - /etc/maddy/config/maddy.conf |
| 52 | volumeMounts: |
| 53 | - name: config |
| 54 | mountPath: /etc/maddy/config |
| 55 | - name: certs |
| 56 | mountPath: /etc/maddy/certs |
| 57 | - name: data |
| 58 | mountPath: /var/lib/maddy |
| 59 | --- |
| 60 | apiVersion: v1 |
| 61 | kind: Service |
| 62 | metadata: |
| 63 | name: maddy |
| 64 | namespace: {{ .Release.Namespace }} |
| 65 | spec: |
| 66 | type: LoadBalancer |
| 67 | externalTrafficPolicy: Local |
| 68 | selector: |
| 69 | app: maddy |
| 70 | ports: |
| 71 | - name: imap |
| 72 | port: 143 |
| 73 | protocol: TCP |
| 74 | - name: imaps |
| 75 | port: 993 |
| 76 | protocol: TCP |
| 77 | - name: smtp |
| 78 | port: 25 |
| 79 | protocol: TCP |
| 80 | - name: smtps |
| 81 | port: 465 |
| 82 | protocol: TCP |
| 83 | - name: submission |
| 84 | port: 587 |
| 85 | protocol: TCP |
| 86 | --- |
| 87 | apiVersion: v1 |
| 88 | kind: PersistentVolumeClaim |
| 89 | metadata: |
| 90 | name: data |
| 91 | namespace: {{ .Release.Namespace }} |
| 92 | spec: |
| 93 | accessModes: |
| 94 | - ReadWriteOnce |
| 95 | resources: |
| 96 | requests: |
| giolekva | 3423ac2 | 2021-11-28 20:47:34 +0400 | [diff] [blame] | 97 | storage: {{ .Values.persistence.size }} |