From 337036129beaacb149ad0b8b5f51f9a23c2f996e Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 17 Apr 2023 14:09:26 +0200 Subject: [PATCH] fix(helm): Variable override, prioriry to the user created one. (#1173) --- .../charts/assets/templates/deployment.yaml | 16 ++++++++-------- .../charts/http/templates/deployment.yaml | 16 ++++++++-------- .../charts/sink/templates/deployment.yaml | 16 ++++++++-------- .../sourcemapreader/templates/deployment.yaml | 16 ++++++++-------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml index 6c96f33d8..2c5f78574 100644 --- a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml @@ -43,6 +43,14 @@ spec: {{- .Values.healthCheck | toYaml | nindent 10}} {{- end}} env: + {{- range $key, $val := .Values.env }} + - name: {{ $key }} + value: '{{ $val }}' + {{- end}} + {{- range $key, $val := .Values.global.env }} + - name: {{ $key }} + value: '{{ $val }}' + {{- end }} - name: AWS_ACCESS_KEY_ID {{- if .Values.global.s3.existingSecret }} valueFrom: @@ -94,14 +102,6 @@ spec: value: '{{ .Values.global.s3.endpoint }}/{{.Values.global.s3.assetsBucket}}' {{- end }} {{- include "openreplay.env.redis_string" .Values.global.redis | nindent 12 }} - {{- range $key, $val := .Values.global.env }} - - name: {{ $key }} - value: '{{ $val }}' - {{- end }} - {{- range $key, $val := .Values.env }} - - name: {{ $key }} - value: '{{ $val }}' - {{- end}} ports: {{- range $key, $val := .Values.service.ports }} - name: {{ $key }} diff --git a/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml index 4072629b0..89363f7a4 100644 --- a/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml @@ -43,6 +43,14 @@ spec: {{- .Values.healthCheck | toYaml | nindent 10}} {{- end}} env: + {{- range $key, $val := .Values.env }} + - name: {{ $key }} + value: '{{ $val }}' + {{- end}} + {{- range $key, $val := .Values.global.env }} + - name: {{ $key }} + value: '{{ $val }}' + {{- end }} - name: AWS_ACCESS_KEY_ID {{- if .Values.global.s3.existingSecret }} valueFrom: @@ -101,14 +109,6 @@ spec: value: '{{ .Values.global.s3.endpoint }}/{{.Values.global.s3.assetsBucket}}' {{- end }} {{- include "openreplay.env.redis_string" .Values.global.redis | nindent 12 }} - {{- range $key, $val := .Values.global.env }} - - name: {{ $key }} - value: '{{ $val }}' - {{- end }} - {{- range $key, $val := .Values.env }} - - name: {{ $key }} - value: '{{ $val }}' - {{- end}} ports: {{- range $key, $val := .Values.service.ports }} - name: {{ $key }} diff --git a/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml index 45685fbec..d17235650 100644 --- a/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml @@ -43,6 +43,14 @@ spec: {{- .Values.healthCheck | toYaml | nindent 10}} {{- end}} env: + {{- range $key, $val := .Values.env }} + - name: {{ $key }} + value: '{{ $val }}' + {{- end}} + {{- range $key, $val := .Values.global.env }} + - name: {{ $key }} + value: '{{ $val }}' + {{- end }} - name: LICENSE_KEY value: '{{ .Values.global.enterpriseEditionLicense }}' - name: KAFKA_SERVERS @@ -70,14 +78,6 @@ spec: value: '{{ .Values.global.s3.endpoint }}/{{.Values.global.s3.assetsBucket}}' {{- end }} {{- include "openreplay.env.redis_string" .Values.global.redis | nindent 12 }} - {{- range $key, $val := .Values.global.env }} - - name: {{ $key }} - value: '{{ $val }}' - {{- end }} - {{- range $key, $val := .Values.env }} - - name: {{ $key }} - value: '{{ $val }}' - {{- end}} ports: {{- range $key, $val := .Values.service.ports }} - name: {{ $key }} diff --git a/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/deployment.yaml index a6d334158..94738b7d8 100644 --- a/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/deployment.yaml @@ -43,6 +43,14 @@ spec: {{- .Values.healthCheck | toYaml | nindent 10}} {{- end}} env: + {{- range $key, $val := .Values.env }} + - name: {{ $key }} + value: '{{ $val }}' + {{- end}} + {{- range $key, $val := .Values.global.env }} + - name: {{ $key }} + value: '{{ $val }}' + {{- end }} - name: AWS_ACCESS_KEY_ID value: {{ .Values.global.s3.accessKey }} - name: AWS_SECRET_ACCESS_KEY @@ -78,14 +86,6 @@ spec: # S3 compatible storage value: '{{ .Values.global.s3.endpoint }}/{{.Values.global.s3.assetsBucket}}' {{- end }} - {{- range $key, $val := .Values.global.env }} - - name: {{ $key }} - value: '{{ $val }}' - {{- end }} - {{- range $key, $val := .Values.env }} - - name: {{ $key }} - value: '{{ $val }}' - {{- end}} ports: {{- range $key, $val := .Values.service.ports }} - name: {{ $key }}