From ceabceb18468229ec2e0ed4f90a9f61b452d2f68 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Tue, 27 May 2025 15:13:35 +0200 Subject: [PATCH] fix(helm): standardize template syntax and fix variable references - Add quotes around boolean string values in REDIS_CACHE_ENABLED - Fix variable reference from .Values.redis.redisHost to .Values.redisHost - Remove extra hyphens in template expressions for cleaner syntax - Update assist_url helper to use printf for better string formatting These changes ensure consistent Helm template syntax and fix broken variable references that could cause deployment issues. Signed-off-by: rjshrjndrn --- .../openreplay/charts/assist-api/templates/deployment.yaml | 2 +- .../openreplay/charts/assist/templates/deployment.yaml | 2 +- .../openreplay/charts/chalice/templates/deployment.yaml | 2 +- scripts/helmcharts/openreplay/templates/_helpers.tpl | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/helmcharts/openreplay/charts/assist-api/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/assist-api/templates/deployment.yaml index b1b540590..232b9528f 100644 --- a/scripts/helmcharts/openreplay/charts/assist-api/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/assist-api/templates/deployment.yaml @@ -59,7 +59,7 @@ spec: - name: POSTGRES_STRING value: 'postgres://{{ .Values.global.postgresql.postgresqlUser }}:$(pg_password)@{{ .Values.global.postgresql.postgresqlHost }}:{{ .Values.global.postgresql.postgresqlPort }}/{{ .Values.global.postgresql.postgresqlDatabase }}' - name: REDIS_CACHE_ENABLED - value: {{- if .Values.global.enterpriseEditionLicense }}true{{- else }}false{{- end }} + value: {{ if .Values.global.enterpriseEditionLicense }}"true"{{ else }}"false"{{ end }} {{- include "openreplay.env.redis_string" .Values.global.redis | nindent 12 }} {{- range $key, $val := .Values.global.env }} - name: {{ $key }} diff --git a/scripts/helmcharts/openreplay/charts/assist/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/assist/templates/deployment.yaml index 99552f88c..d12498255 100644 --- a/scripts/helmcharts/openreplay/charts/assist/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/assist/templates/deployment.yaml @@ -50,7 +50,7 @@ spec: - name: AWS_DEFAULT_REGION value: "{{ .Values.global.s3.region }}" - name: REDIS_URL - value: {{ default .Values.global.redis.redisHost .Values.redis.redisHost }} + value: {{ default .Values.global.redis.redisHost .Values.redisHost }} {{- if .Values.global.enterpriseEditionLicense }} - name: COMPRESSION value: "true" diff --git a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml index f690fcb33..a18256e30 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml @@ -59,7 +59,7 @@ spec: - name: sourcemaps_reader value: "http://sourcemapreader-openreplay.{{.Release.Namespace}}.{{.Values.global.clusterDomain}}:9000/%s/sourcemaps" - name: ASSIST_URL - value: {{- include "openreplay.assist_url" . }} + value: {{ include "openreplay.assist_url" . }} - name: ASSIST_JWT_SECRET value: {{ .Values.global.assistJWTSecret }} - name: JWT_SECRET diff --git a/scripts/helmcharts/openreplay/templates/_helpers.tpl b/scripts/helmcharts/openreplay/templates/_helpers.tpl index 9a99eadf3..e25379b03 100644 --- a/scripts/helmcharts/openreplay/templates/_helpers.tpl +++ b/scripts/helmcharts/openreplay/templates/_helpers.tpl @@ -164,8 +164,8 @@ Create the volume mount config for redis TLS certificates {{- define "openreplay.assist_url"}} {{- if .Values.global.enterpriseEditionLicense }} -"http://assist-api-openreplay.{{.Release.Namespace}}.{{.Values.global.clusterDomain}}:9001/assist/%s" +{{- printf "http://assist-api-openreplay.%s.%s:9001/assist/%s" .Release.Namespace .Values.global.clusterDomain }} {{- else}} -"http://assist-openreplay.{{.Release.Namespace}}.{{.Values.global.clusterDomain}}:9001/assist/%s" +{{- printf "http://assist-openreplay.%s.%s:9001/assist/%s" .Release.Namespace .Values.global.clusterDomain }} {{- end}} {{- end}}