From e8b34a895b40f437be5581b8c19c9c37c9cd2ecc Mon Sep 17 00:00:00 2001 From: DavidSpek Date: Wed, 19 Oct 2022 14:40:44 +0200 Subject: [PATCH] fix missing env vars Signed-off-by: DavidSpek --- helm/oncall/templates/_env.tpl | 9 +++++++++ helm/oncall/templates/celery/_deployment.tpl | 2 -- helm/oncall/templates/engine/deployment.yaml | 2 -- helm/oncall/templates/engine/job-migrate.yaml | 2 -- helm/oncall/values.yaml | 1 + 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/helm/oncall/templates/_env.tpl b/helm/oncall/templates/_env.tpl index 9c7fdfe9..7e4b8f48 100644 --- a/helm/oncall/templates/_env.tpl +++ b/helm/oncall/templates/_env.tpl @@ -231,6 +231,9 @@ {{- end }} {{- define "snippet.oncall.smtp.env" -}} +{{- if .Values.oncall.smtp.enabled -}} +- name: FEATURE_EMAIL_INTEGRATION_ENABLED + value: {{ .Values.oncall.smtp.enabled | toString | title | quote }} - name: EMAIL_HOST value: {{ .Values.oncall.smtp.host | quote }} - name: EMAIL_PORT @@ -245,4 +248,10 @@ key: smtp-password - name: EMAIL_USE_TLS value: {{ .Values.oncall.smtp.tls | toString | title | quote }} +- name: DEFAULT_FROM_EMAIL + value: {{ .Values.oncall.smtp.fromEmail | quote }} +{{- else -}} +- name: FEATURE_EMAIL_INTEGRATION_ENABLED + value: {{ .Values.oncall.smtp.enabled | toString | title | quote }} +{{- end -}} {{- end }} diff --git a/helm/oncall/templates/celery/_deployment.tpl b/helm/oncall/templates/celery/_deployment.tpl index 4a97ea0c..0892c0cb 100644 --- a/helm/oncall/templates/celery/_deployment.tpl +++ b/helm/oncall/templates/celery/_deployment.tpl @@ -41,9 +41,7 @@ spec: {{- include "snippet.oncall.env" . | nindent 12 }} {{- include "snippet.oncall.slack.env" . | nindent 12 }} {{- include "snippet.oncall.telegram.env" . | nindent 12 }} - {{- if .Values.oncall.smtp.enabled }} {{- include "snippet.oncall.smtp.env" . | nindent 12 }} - {{- end }} {{- include "snippet.mysql.env" . | nindent 12 }} {{- include "snippet.rabbitmq.env" . | nindent 12 }} {{- include "snippet.redis.env" . | nindent 12 }} diff --git a/helm/oncall/templates/engine/deployment.yaml b/helm/oncall/templates/engine/deployment.yaml index 6563d335..5b1f7776 100644 --- a/helm/oncall/templates/engine/deployment.yaml +++ b/helm/oncall/templates/engine/deployment.yaml @@ -47,9 +47,7 @@ spec: {{- include "snippet.oncall.env" . | nindent 12 }} {{- include "snippet.oncall.slack.env" . | nindent 12 }} {{- include "snippet.oncall.telegram.env" . | nindent 12 }} - {{- if .Values.oncall.smtp.enabled }} {{- include "snippet.oncall.smtp.env" . | nindent 12 }} - {{- end }} {{- include "snippet.mysql.env" . | nindent 12 }} {{- include "snippet.rabbitmq.env" . | nindent 12 }} {{- include "snippet.redis.env" . | nindent 12 }} diff --git a/helm/oncall/templates/engine/job-migrate.yaml b/helm/oncall/templates/engine/job-migrate.yaml index 8dcc39fd..8778f420 100644 --- a/helm/oncall/templates/engine/job-migrate.yaml +++ b/helm/oncall/templates/engine/job-migrate.yaml @@ -43,9 +43,7 @@ spec: python manage.py migrate env: {{- include "snippet.oncall.env" . | nindent 12 }} - {{- if .Values.oncall.smtp.enabled }} {{- include "snippet.oncall.smtp.env" . | nindent 12 }} - {{- end }} {{- include "snippet.mysql.env" . | nindent 12 }} {{- include "snippet.rabbitmq.env" . | nindent 12 }} {{- include "snippet.redis.env" . | nindent 12 }} diff --git a/helm/oncall/values.yaml b/helm/oncall/values.yaml index 974fc442..9dcae3ff 100644 --- a/helm/oncall/values.yaml +++ b/helm/oncall/values.yaml @@ -86,6 +86,7 @@ oncall: username: ~ password: ~ tls: ~ + fromEmail: ~ # Whether to run django database migrations automatically migrate: