diff --git a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml index 350054599..d722997b1 100644 --- a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml @@ -69,8 +69,22 @@ spec: value: '{{ .Values.global.s3.endpoint }}' - name: AWS_REGION value: '{{ .Values.global.s3.region }}' + {{- if .Values.global.redis.existingSecret }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.global.redis.existingSecret }} + key: redis-password + {{- else if .Values.global.redis.redisPassword }} + - name: REDIS_PASSWORD + value: {{ .Values.global.redis.redisPassword }} + {{- end}} - name: REDIS_STRING - value: '{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- if or .Values.global.redis.existingSecret .Values.global.redis.redisPassword }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisUsername }}:$(REDIS_PASSWORD)@{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- else }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- end}} - name: KAFKA_SERVERS value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}' - name: KAFKA_USE_SSL diff --git a/scripts/helmcharts/openreplay/charts/db/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/db/templates/deployment.yaml index 02831fa73..5cd90ec09 100644 --- a/scripts/helmcharts/openreplay/charts/db/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/db/templates/deployment.yaml @@ -47,8 +47,22 @@ spec: value: '{{ .Values.global.clickhouse.chHost }}:{{.Values.global.clickhouse.service.webPort}}/{{.Values.env.ch_db}}' - name: LICENSE_KEY value: '{{ .Values.global.enterpriseEditionLicense }}' + {{- if .Values.global.redis.existingSecret }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.global.redis.existingSecret }} + key: redis-password + {{- else if .Values.global.redis.redisPassword }} + - name: REDIS_PASSWORD + value: {{ .Values.global.redis.redisPassword }} + {{- end}} - name: REDIS_STRING - value: '{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- if or .Values.global.redis.existingSecret .Values.global.redis.redisPassword }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisUsername }}:$(REDIS_PASSWORD)@{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- else }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- end}} - name: KAFKA_SERVERS value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}' - name: KAFKA_USE_SSL diff --git a/scripts/helmcharts/openreplay/charts/ender/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/ender/templates/deployment.yaml index 22713eee8..a2c101cd9 100644 --- a/scripts/helmcharts/openreplay/charts/ender/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/ender/templates/deployment.yaml @@ -45,8 +45,22 @@ spec: env: - name: LICENSE_KEY value: '{{ .Values.global.enterpriseEditionLicense }}' + {{- if .Values.global.redis.existingSecret }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.global.redis.existingSecret }} + key: redis-password + {{- else if .Values.global.redis.redisPassword }} + - name: REDIS_PASSWORD + value: {{ .Values.global.redis.redisPassword }} + {{- end}} - name: REDIS_STRING - value: '{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- if or .Values.global.redis.existingSecret .Values.global.redis.redisPassword }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisUsername }}:$(REDIS_PASSWORD)@{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- else }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- end}} - name: KAFKA_SERVERS value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}' - name: KAFKA_USE_SSL diff --git a/scripts/helmcharts/openreplay/charts/frontend/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/frontend/templates/deployment.yaml index c41dc1313..aa782c023 100644 --- a/scripts/helmcharts/openreplay/charts/frontend/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/frontend/templates/deployment.yaml @@ -65,8 +65,22 @@ spec: value: '{{ .Values.global.s3.region }}' - name: LICENSE_KEY value: '{{ .Values.global.enterpriseEditionLicense }}' + {{- if .Values.global.redis.existingSecret }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.global.redis.existingSecret }} + key: redis-password + {{- else if .Values.global.redis.redisPassword }} + - name: REDIS_PASSWORD + value: {{ .Values.global.redis.redisPassword }} + {{- end}} - name: REDIS_STRING - value: '{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- if or .Values.global.redis.existingSecret .Values.global.redis.redisPassword }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisUsername }}:$(REDIS_PASSWORD)@{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- else }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- end}} - name: KAFKA_SERVERS value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}' - name: KAFKA_USE_SSL diff --git a/scripts/helmcharts/openreplay/charts/heuristics/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/heuristics/templates/deployment.yaml index 4e1b78605..fc33efe24 100644 --- a/scripts/helmcharts/openreplay/charts/heuristics/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/heuristics/templates/deployment.yaml @@ -45,8 +45,22 @@ spec: env: - name: LICENSE_KEY value: '{{ .Values.global.enterpriseEditionLicense }}' + {{- if .Values.global.redis.existingSecret }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.global.redis.existingSecret }} + key: redis-password + {{- else if .Values.global.redis.redisPassword }} + - name: REDIS_PASSWORD + value: {{ .Values.global.redis.redisPassword }} + {{- end}} - name: REDIS_STRING - value: '{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- if or .Values.global.redis.existingSecret .Values.global.redis.redisPassword }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisUsername }}:$(REDIS_PASSWORD)@{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- else }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- end}} - name: KAFKA_SERVERS value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}' - name: KAFKA_USE_SSL diff --git a/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml index 6322ab754..81a144003 100644 --- a/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml @@ -65,8 +65,22 @@ spec: value: '{{ .Values.global.s3.region }}' - name: LICENSE_KEY value: '{{ .Values.global.enterpriseEditionLicense }}' + {{- if .Values.global.redis.existingSecret }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.global.redis.existingSecret }} + key: redis-password + {{- else if .Values.global.redis.redisPassword }} + - name: REDIS_PASSWORD + value: {{ .Values.global.redis.redisPassword }} + {{- end}} - name: REDIS_STRING - value: '{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- if or .Values.global.redis.existingSecret .Values.global.redis.redisPassword }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisUsername }}:$(REDIS_PASSWORD)@{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- else }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- end}} - name: KAFKA_SERVERS value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}' - name: KAFKA_USE_SSL diff --git a/scripts/helmcharts/openreplay/charts/integrations/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/integrations/templates/deployment.yaml index 618d32f47..b80e246f9 100644 --- a/scripts/helmcharts/openreplay/charts/integrations/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/integrations/templates/deployment.yaml @@ -45,8 +45,22 @@ spec: env: - name: LICENSE_KEY value: '{{ .Values.global.enterpriseEditionLicense }}' + {{- if .Values.global.redis.existingSecret }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.global.redis.existingSecret }} + key: redis-password + {{- else if .Values.global.redis.redisPassword }} + - name: REDIS_PASSWORD + value: {{ .Values.global.redis.redisPassword }} + {{- end}} - name: REDIS_STRING - value: '{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- if or .Values.global.redis.existingSecret .Values.global.redis.redisPassword }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisUsername }}:$(REDIS_PASSWORD)@{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- else }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- end}} - name: KAFKA_SERVERS value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}' - name: KAFKA_USE_SSL diff --git a/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml index 20806f4a1..d8c2e406b 100644 --- a/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml @@ -45,8 +45,22 @@ spec: env: - name: LICENSE_KEY value: '{{ .Values.global.enterpriseEditionLicense }}' + {{- if .Values.global.redis.existingSecret }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.global.redis.existingSecret }} + key: redis-password + {{- else if .Values.global.redis.redisPassword }} + - name: REDIS_PASSWORD + value: {{ .Values.global.redis.redisPassword }} + {{- end}} - name: REDIS_STRING - value: '{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- if or .Values.global.redis.existingSecret .Values.global.redis.redisPassword }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisUsername }}:$(REDIS_PASSWORD)@{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- else }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- end}} - name: KAFKA_SERVERS value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}' - name: KAFKA_USE_SSL diff --git a/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml index 6a60e3ab3..46a1b9700 100644 --- a/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml @@ -73,8 +73,22 @@ spec: value: {{ .Values.global.s3.recordingsBucket }} - name: LICENSE_KEY value: '{{ .Values.global.enterpriseEditionLicense }}' + {{- if .Values.global.redis.existingSecret }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.global.redis.existingSecret }} + key: redis-password + {{- else if .Values.global.redis.redisPassword }} + - name: REDIS_PASSWORD + value: {{ .Values.global.redis.redisPassword }} + {{- end}} - name: REDIS_STRING - value: '{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- if or .Values.global.redis.existingSecret .Values.global.redis.redisPassword }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisUsername }}:$(REDIS_PASSWORD)@{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- else }} + value: '{{ ternary "rediss" "redis" .Values.global.redis.tls.enabled }}://{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' + {{- end}} - name: KAFKA_SERVERS value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}' - name: KAFKA_USE_SSL