-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Useful to program system wide status reports with cronjobs (closes #308).
- Loading branch information
Diego Rodriguez
committed
May 19, 2020
1 parent
4b36915
commit 38c6b9a
Showing
4 changed files
with
114 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{{- if .Values.notifications.enabled }} | ||
{{- if .Values.notifications.system_status }} | ||
apiVersion: batch/v1beta1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ include "reana.prefix" . }}-system-status | ||
spec: | ||
schedule: {{ .Values.notifications.system_status }} | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: {{ include "reana.prefix" . }}-system-status | ||
image: {{ .Values.components.reana_server.image }} | ||
command: | ||
- '/bin/sh' | ||
- '-c' | ||
args: | ||
- 'flask reana-admin status-report --email {{ .Values.notifications.email_config.receiver }}' | ||
{{- if .Values.debug.enabled }} | ||
tty: true | ||
stdin: true | ||
{{- end }} | ||
env: | ||
{{- range $key, $value := .Values.db_env_config }} | ||
- name: {{ $key }} | ||
value: {{ $value | quote }} | ||
{{- end }} | ||
{{- if .Values.debug.enabled }} | ||
- name: REANA_EMAIL_SMTP_SERVER | ||
value: {{ include "reana.prefix" . }}-mail | ||
- name: REANA_EMAIL_SMTP_PORT | ||
value: "30025" | ||
- name: FLASK_ENV | ||
value: "development" | ||
{{- else }} | ||
- name: REANA_EMAIL_SMTP_SERVER | ||
value: {{ .Values.notifications.email_config.smtp_server }} | ||
- name: REANA_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: | ||
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 | ||
{{- end }} | ||
- name: REANA_COMPONENT_PREFIX | ||
value: {{ include "reana.prefix" . }} | ||
- name: REANA_EMAIL_SENDER | ||
value: {{ .Values.notifications.email_config.sender }} | ||
- name: REANA_ADMIN_ACCESS_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ include "reana.prefix" . }}-admin-access-token | ||
key: ADMIN_ACCESS_TOKEN | ||
volumeMounts: | ||
{{- if .Values.debug.enabled }} | ||
- mountPath: /code/ | ||
name: reana-code | ||
{{- end }} | ||
- mountPath: {{ .Values.shared_storage.shared_volume_mount_path }} | ||
name: reana-shared-volume | ||
imagePullPolicy: IfNotPresent | ||
restartPolicy: Never | ||
volumes: | ||
- name: reana-shared-volume | ||
{{- if not (eq .Values.shared_storage.backend "hostpath") }} | ||
persistentVolumeClaim: | ||
claimName: {{ include "reana.prefix" . }}-shared-persistent-volume | ||
readOnly: false | ||
{{- else }} | ||
hostPath: | ||
path: {{ .Values.shared_storage.hostpath.root_path }} | ||
{{- end }} | ||
- name: reana-code | ||
hostPath: | ||
path: /code/reana-server | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters