From 26747bcd759a8ac7d43772cfdcff8da37016ce0d Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Thu, 31 Aug 2023 11:15:01 +0200 Subject: [PATCH] fix broker.type in helm values --- helm/oncall/templates/_env.tpl | 5 +++++ helm/oncall/tests/redis_env_test.yaml | 1 + 2 files changed, 6 insertions(+) diff --git a/helm/oncall/templates/_env.tpl b/helm/oncall/templates/_env.tpl index e8f9a81f..80c498cc 100644 --- a/helm/oncall/templates/_env.tpl +++ b/helm/oncall/templates/_env.tpl @@ -528,10 +528,15 @@ key: {{ include "snippet.redis.password.secret.key" . | quote}} {{- end }} +{{- /* +when broker.type != rabbitmq, we do not need to include rabbitmq environment variables +*/}} {{- define "snippet.broker.env" -}} {{- include "snippet.redis.env" . }} +{{- if eq .Values.broker.type "rabbitmq" -}} {{- include "snippet.rabbitmq.env" . }} {{- end }} +{{- end }} {{- define "snippet.db.env" -}} {{- if eq .Values.database.type "mysql" }} diff --git a/helm/oncall/tests/redis_env_test.yaml b/helm/oncall/tests/redis_env_test.yaml index d9408f3c..c482679c 100644 --- a/helm/oncall/tests/redis_env_test.yaml +++ b/helm/oncall/tests/redis_env_test.yaml @@ -109,6 +109,7 @@ tests: - celery/deployment.yaml set: broker.type: redis + rabbitmq.enabled: false redis.enabled: false externalRedis: host: custom-host