From 36d2da6a7dcf89b16310cc08fafe35b05ca2cdc8 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 23 Aug 2023 09:52:31 +0300 Subject: [PATCH] [mlrun] Fix Duplications Between `extraEnv` and `extraEnvKeyVal` (#1000) Co-authored-by: quaark --- stable/mlrun/Chart.yaml | 2 +- stable/mlrun/templates/api-chief-deployment.yaml | 7 ++++++- stable/mlrun/templates/api-worker-deployment.yaml | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/stable/mlrun/Chart.yaml b/stable/mlrun/Chart.yaml index f1f09a859..0985cd7a1 100644 --- a/stable/mlrun/Chart.yaml +++ b/stable/mlrun/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: mlrun -version: 0.8.28 +version: 0.8.29 appVersion: 1.4.0 description: Machine Learning automation and tracking sources: diff --git a/stable/mlrun/templates/api-chief-deployment.yaml b/stable/mlrun/templates/api-chief-deployment.yaml index 57dee8a65..8d56a7316 100644 --- a/stable/mlrun/templates/api-chief-deployment.yaml +++ b/stable/mlrun/templates/api-chief-deployment.yaml @@ -107,7 +107,12 @@ spec: value: {{ .Values.api.sidecars.logCollector.getLogsBufferSizeBytes | quote }} {{- end }} {{- if .Values.api.extraEnv }} - {{ toYaml .Values.api.extraEnv | nindent 10 }} + {{- range .Values.api.extraEnv }} + {{- if not (hasKey $.Values.api.extraEnvKeyValue .name) }} + - name: {{ .name }} + value: {{ .value }} + {{- end }} + {{- end }} {{- end }} {{- if .Values.api.extraEnvKeyValue }} {{- range $name, $value := .Values.api.extraEnvKeyValue }} diff --git a/stable/mlrun/templates/api-worker-deployment.yaml b/stable/mlrun/templates/api-worker-deployment.yaml index a5335a6df..33820896d 100644 --- a/stable/mlrun/templates/api-worker-deployment.yaml +++ b/stable/mlrun/templates/api-worker-deployment.yaml @@ -101,7 +101,12 @@ spec: value: {{ .Values.api.sidecars.logCollector.getLogsBufferSizeBytes | quote }} {{- end }} {{- if .Values.api.extraEnv }} - {{ toYaml .Values.api.extraEnv | nindent 10 }} + {{- range .Values.api.extraEnv }} + {{- if not (hasKey $.Values.api.extraEnvKeyValue .name) }} + - name: {{ .name }} + value: {{ .value }} + {{- end }} + {{- end }} {{- end }} {{- if .Values.api.extraEnvKeyValue }} {{- range $name, $value := .Values.api.extraEnvKeyValue }}