-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
deployment.yaml
93 lines (93 loc) · 2.24 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
apiVersion: v1
kind: Namespace
metadata:
name: msmtpd
---
apiVersion: v1
kind: ConfigMap
metadata:
name: msmtpd-config
namespace: msmtpd
data:
smtp_user: |
smtp_password: |
gmailpassword
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: msmtpd
namespace: msmtpd
labels:
app: msmtpd
spec:
serviceName: msmtpd
replicas: 1
selector:
matchLabels:
app: msmtpd
template:
metadata:
labels:
app: msmtpd
name: msmtpd
spec:
containers:
- name: msmtpd
image: crazymax/msmtpd
imagePullPolicy: IfNotPresent
env:
- name: TZ
value: Europe/Paris
- name: PUID
value: "1500"
- name: PGID
value: "1500"
- name: SMTP_HOST
value: "smtp.gmail.com"
- name: SMTP_PORT
value: "587"
- name: SMTP_TLS
value: "on"
- name: SMTP_STARTTLS
value: "on"
- name: SMTP_TLS_CHECKCERT
value: "on"
- name: SMTP_AUTH
value: "on"
- name: SMTP_USER_FILE
value: "/run/secrets/smtp_user"
- name: SMTP_PASSWORD_FILE
value: "/run/secrets/smtp_password"
- name: SMTP_DOMAIN
value: "localhost"
volumeMounts:
- name: msmtpd-config-user
mountPath: /run/secrets/smtp_user
subPath: smtp_user
- name: msmtpd-config-password
mountPath: /run/secrets/smtp_password
subPath: smtp_password
volumes:
- name: msmtpd-config-user
configMap:
name: msmtpd-config
- name: msmtpd-config-password
configMap:
name: msmtpd-config
---
apiVersion: v1
kind: Service
metadata:
name: smtp
namespace: msmtpd
spec:
selector:
app: msmtpd
ports:
- port: 25
targetPort: 2500
protocol: TCP
name: smtp