Skip to content

Commit

Permalink
helm: add mail service for development faces
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Rodriguez committed May 19, 2020
1 parent fc9084b commit 544e61f
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 4 deletions.
8 changes: 8 additions & 0 deletions helm/configurations/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ components:
image: reanahub/reana-message-broker
reana_ui:
image: reanahub/reana-ui

notifications:
enabled: true
email_config:
# No login nor password as we use a dev mail service
receiver: team@reana.io
sender: notifications@reana.io
system_status: "*/5 * * * *"
6 changes: 2 additions & 4 deletions helm/reana/templates/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: CronJob
metadata:
name: {{ include "reana.prefix" . }}-system-status
spec:
schedule: {{ .Values.notifications.system_status }}
schedule: "{{ .Values.notifications.system_status }}"
jobTemplate:
spec:
template:
Expand Down Expand Up @@ -33,10 +33,8 @@ spec:
{{- else }}
- name: REANA_EMAIL_SMTP_SERVER
value: {{ .Values.notifications.email_config.smtp_server }}
- name: REANA_SMTP_PORT
- name: REANA_EMAIL_SMTP_PORT
value: {{ .Values.notifications.email_config.smpt_port }}
- name: REANA_EMAIL_SENDER
value: {{ .Values.notifications.email_config.sender }}
- name: REANA_EMAIL_LOGIN
valueFrom:
secretKeyRef:
Expand Down
44 changes: 44 additions & 0 deletions helm/reana/templates/reana-mail.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{{- if .Values.debug.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "reana.prefix" . }}-mail
spec:
type: "NodePort"
ports:
- port: 30025
targetPort: 25
nodePort: 30025
name: "smtp"
protocol: TCP
- port: 32580
targetPort: 80
nodePort: 32580
name: "ui"
protocol: TCP
selector:
app: {{ include "reana.prefix" . }}-mail
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "reana.prefix" . }}-mail
spec:
replicas: 1
selector:
matchLabels:
app: {{ include "reana.prefix" . }}-mail
template:
metadata:
labels:
app: {{ include "reana.prefix" . }}-mail
spec:
containers:
- name: maildev
image: maildev/maildev
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
- containerPort: 25
{{- end }}
20 changes: 20 additions & 0 deletions helm/reana/templates/reana-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,25 @@ spec:
value: ""
- name: GIT_SSL_NO_VERIFY
value: "true"
- name: REANA_EMAIL_SMTP_SERVER
value: {{ include "reana.prefix" . }}-mail
- name: REANA_EMAIL_SMTP_PORT
value: "30025"
{{- else }}
- name: REANA_EMAIL_SMTP_SERVER
value: {{ .Values.notifications.email_config.smtp_server }}
- name: REANA_EMAIL_SMTP_PORT
value: {{ .Values.notifications.email_config.smpt_port }}
- name: REANA_EMAIL_LOGIN
valueFrom:
secretKeyRef:
name: {{ include "reana.prefix" . }}-mail-notification-sender-password
key: REANA_EMAIL_LOGIN
- name: REANA_EMAIL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "reana.prefix" . }}-mail-notification-sender-password
key: REANA_EMAIL_PASSWORD
- name: REANA_DB_USERNAME
valueFrom:
secretKeyRef:
Expand All @@ -123,6 +141,8 @@ spec:
name: {{ include "reana.prefix" . }}-db-secrets
key: password
{{- end }}
- name: REANA_EMAIL_SENDER
value: {{ .Values.notifications.email_config.sender }}
- name: scheduler
image: {{ .Values.components.reana_server.image }}
imagePullPolicy: {{ .Values.components.reana_server.imagePullPolicy }}
Expand Down

0 comments on commit 544e61f

Please sign in to comment.