diff --git a/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/deployment.yaml index 1d8041c5b..a6d334158 100644 --- a/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/deployment.yaml @@ -51,8 +51,7 @@ spec: value: '{{ .Values.global.s3.region }}' - name: LICENSE_KEY value: '{{ .Values.global.enterpriseEditionLicense }}' - - name: REDIS_STRING - value: '{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- include "openreplay.env.redis_string" .Values.global.redis | nindent 12 }} - name: KAFKA_SERVERS value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}' - name: KAFKA_USE_SSL diff --git a/scripts/helmcharts/openreplay/templates/_helpers.tpl b/scripts/helmcharts/openreplay/templates/_helpers.tpl index 400ff0366..09a5be245 100644 --- a/scripts/helmcharts/openreplay/templates/_helpers.tpl +++ b/scripts/helmcharts/openreplay/templates/_helpers.tpl @@ -65,6 +65,7 @@ Create the name of the service account to use Create the environment configuration for REDIS_STRING */}} {{- define "openreplay.env.redis_string" -}} +{{- if .enabled }} {{- $scheme := (eq (.tls | default dict).enabled true) | ternary "rediss" "redis" -}} {{- $auth := "" -}} {{- if or .existingSecret .redisPassword -}} @@ -83,6 +84,7 @@ Create the environment configuration for REDIS_STRING - name: REDIS_STRING value: '{{ $scheme }}://{{ $auth }}{{ .redisHost }}:{{ .redisPort }}' {{- end }} +{{- end }} {{/* Create the volume mount config for redis TLS certificates