From fa2fab7b8d65ded4424a54d8f154a07ab998104d Mon Sep 17 00:00:00 2001 From: Oleksii Moskalenko Date: Tue, 8 Sep 2020 09:39:22 +0800 Subject: [PATCH 1/2] allow map in envvars overrides --- .../charts/feast/charts/feast-core/templates/deployment.yaml | 5 +++++ .../charts/feast-jobcontroller/templates/deployment.yaml | 5 +++++ .../feast/charts/feast-serving/templates/deployment.yaml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/infra/charts/feast/charts/feast-core/templates/deployment.yaml b/infra/charts/feast/charts/feast-core/templates/deployment.yaml index 8b2343ee9c..57f4d131c6 100644 --- a/infra/charts/feast/charts/feast-core/templates/deployment.yaml +++ b/infra/charts/feast/charts/feast-core/templates/deployment.yaml @@ -100,7 +100,12 @@ spec: {{- range $key, $value := .Values.envOverrides }} - name: {{ printf "%s" $key | replace "." "_" | upper | quote }} + {{- if eq (kindOf $value) "map" }} + valueFrom: + {{- toYaml $value | nindent 12}} + {{- else }} value: {{ $value | quote }} + {{- end}} {{- end }} command: diff --git a/infra/charts/feast/charts/feast-jobcontroller/templates/deployment.yaml b/infra/charts/feast/charts/feast-jobcontroller/templates/deployment.yaml index c9a33dbe28..c01268648a 100644 --- a/infra/charts/feast/charts/feast-jobcontroller/templates/deployment.yaml +++ b/infra/charts/feast/charts/feast-jobcontroller/templates/deployment.yaml @@ -100,7 +100,12 @@ spec: {{- range $key, $value := .Values.envOverrides }} - name: {{ printf "%s" $key | replace "." "_" | upper | quote }} + {{ - if eq (kindOf $value) "map" }} + valueFrom: + {{ - toYaml $value | nindent 12 }} + {{ - else }} value: {{ $value | quote }} + {{ - end }} {{- end }} command: diff --git a/infra/charts/feast/charts/feast-serving/templates/deployment.yaml b/infra/charts/feast/charts/feast-serving/templates/deployment.yaml index 610dbe5fee..5d54f8fd32 100644 --- a/infra/charts/feast/charts/feast-serving/templates/deployment.yaml +++ b/infra/charts/feast/charts/feast-serving/templates/deployment.yaml @@ -92,7 +92,12 @@ spec: {{- range $key, $value := .Values.envOverrides }} - name: {{ printf "%s" $key | replace "." "_" | upper | quote }} + {{ - if eq (kindOf $value) "map" }} + valueFrom: + {{ - toYaml $value | nindent 12 }} + {{ - else }} value: {{ $value | quote }} + {{ - end }} {{- end }} command: From 10679ce8a584252f1973704435275e73d4255455 Mon Sep 17 00:00:00 2001 From: Oleksii Moskalenko Date: Tue, 8 Sep 2020 10:13:26 +0800 Subject: [PATCH 2/2] fix helm syntax --- .../charts/feast-jobcontroller/templates/deployment.yaml | 8 ++++---- .../feast/charts/feast-serving/templates/deployment.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/infra/charts/feast/charts/feast-jobcontroller/templates/deployment.yaml b/infra/charts/feast/charts/feast-jobcontroller/templates/deployment.yaml index c01268648a..c5ca61750c 100644 --- a/infra/charts/feast/charts/feast-jobcontroller/templates/deployment.yaml +++ b/infra/charts/feast/charts/feast-jobcontroller/templates/deployment.yaml @@ -100,12 +100,12 @@ spec: {{- range $key, $value := .Values.envOverrides }} - name: {{ printf "%s" $key | replace "." "_" | upper | quote }} - {{ - if eq (kindOf $value) "map" }} + {{- if eq (kindOf $value) "map" }} valueFrom: - {{ - toYaml $value | nindent 12 }} - {{ - else }} + {{- toYaml $value | nindent 12 }} + {{- else }} value: {{ $value | quote }} - {{ - end }} + {{- end }} {{- end }} command: diff --git a/infra/charts/feast/charts/feast-serving/templates/deployment.yaml b/infra/charts/feast/charts/feast-serving/templates/deployment.yaml index 5d54f8fd32..556af48ffb 100644 --- a/infra/charts/feast/charts/feast-serving/templates/deployment.yaml +++ b/infra/charts/feast/charts/feast-serving/templates/deployment.yaml @@ -92,12 +92,12 @@ spec: {{- range $key, $value := .Values.envOverrides }} - name: {{ printf "%s" $key | replace "." "_" | upper | quote }} - {{ - if eq (kindOf $value) "map" }} + {{- if eq (kindOf $value) "map" }} valueFrom: - {{ - toYaml $value | nindent 12 }} - {{ - else }} + {{- toYaml $value | nindent 12 }} + {{- else }} value: {{ $value | quote }} - {{ - end }} + {{- end }} {{- end }} command: