File tree Expand file tree Collapse file tree 5 files changed +39
-13
lines changed
Expand file tree Collapse file tree 5 files changed +39
-13
lines changed Original file line number Diff line number Diff line change @@ -2,20 +2,20 @@ apiVersion: v1
22kind : ConfigMap
33metadata :
44 name : alertmanager-config
5- namespace : team-git-push-force-monitor
5+ namespace : {{ .Values.namespace.name }}
66 labels :
77 app : alertmanager
88data :
99 alertmanager.yml : |-
1010 receivers:
1111 - name: 'email-notifications'
1212 email_configs:
13- - to: 'teamgitpushforce@gmail.com '
14- from: 'teamgitpushforce@gmail.com '
15- smarthost: 'smtp.gmail.com:587 '
16- auth_username: 'teamgitpushforce@gmail.com '
17- auth_password : 'prqouryspbzvtrao '
18- auth_identity: 'teamgitpushforce@gmail.com '
19- require_tls: true
13+ - to: '{{ .Values.alertmanager.email.to }} '
14+ from: '{{ .Values.alertmanager.email.from }} '
15+ smarthost: '{{ .Values.alertmanager.email.smarthost }} '
16+ auth_username: '{{ .Values.alertmanager.email.auth_username }} '
17+ auth_password_file : '/etc/alertmanager/secrets/auth_password '
18+ auth_identity: '{{ .Values.alertmanager.email.auth_identity }} '
19+ require_tls: {{ .Values.alertmanager.email.require_tls }}
2020 route:
21- receiver: 'email-notifications'
21+ receiver: 'email-notifications'
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: apps/v1
22kind : Deployment
33metadata :
44 name : alertmanager
5- namespace : team-git-push-force-monitor
5+ namespace : {{ .Values.namespace.name }}
66 labels :
77 app : alertmanager
88spec :
@@ -17,15 +17,20 @@ spec:
1717 spec :
1818 containers :
1919 - name : alertmanager
20- image : prom/ alertmanager:v0.26.0
20+ image : {{ .Values. alertmanager.image.repository }}:{{ .Values.alertmanager.image.tag }}
2121 args :
2222 - " --config.file=/etc/alertmanager/alertmanager.yml"
2323 ports :
2424 - containerPort : 9093
2525 volumeMounts :
2626 - name : config-volume
2727 mountPath : /etc/alertmanager
28+ - name : email-secret-volume
29+ mountPath : /etc/alertmanager/secrets
2830 volumes :
2931 - name : config-volume
3032 configMap :
31- name : alertmanager-config
33+ name : alertmanager-config
34+ - name : email-secret-volume
35+ secret :
36+ secretName : alertmanager-email-secret
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Secret
3+ metadata :
4+ name : alertmanager-email-secret
5+ namespace : {{ .Values.namespace.name }}
6+ labels :
7+ app : alertmanager
8+ type : Opaque
9+ data :
10+ auth_password : {{ .Values.alertmanager.email.auth_password | b64enc | quote }}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v1
22kind : Service
33metadata :
44 name : alertmanager
5- namespace : team-git-push-force-monitor
5+ namespace : {{ .Values.namespace.name }}
66 labels :
77 app : alertmanager
88spec :
Original file line number Diff line number Diff line change @@ -198,6 +198,17 @@ alertmanager:
198198 kubernetes.io/ingress.class : nginx
199199 nginx.ingress.kubernetes.io/ssl-redirect : " true"
200200 nginx.ingress.kubernetes.io/force-ssl-redirect : " true"
201+ # Email notification configuration
202+ email :
203+ to : " teamgitpushforce@gmail.com"
204+ from : " teamgitpushforce@gmail.com"
205+ smarthost : " smtp.gmail.com:587"
206+ auth_username : " teamgitpushforce@gmail.com"
207+ auth_identity : " teamgitpushforce@gmail.com"
208+ # The password below will be stored in a Kubernetes Secret
209+ # This should be replaced with your actual password in a secure manner
210+ auth_password : " prqouryspbzvtrao"
211+ require_tls : true
201212
202213
203214
You can’t perform that action at this time.
0 commit comments