From 63ba3fc9f48b81bda6412a3f26795bd4abd77df2 Mon Sep 17 00:00:00 2001 From: ddl-ebrown Date: Wed, 31 Jan 2024 15:18:56 -0800 Subject: [PATCH] Flyte-core add missing podEnv values - In #4756 / fb9ffd56e81e7f7e4657cd668e53b2f1557e9178, flyte-core got consistent podEnv values established in values.yaml. However, these values were not properly injected into *all* the containers being used in various deployments. Fix that so that they are used in all deployments Signed-off-by: ddl-ebrown --- .../templates/admin/deployment.yaml | 21 +++++++++++++++++++ .../templates/datacatalog/deployment.yaml | 6 ++++++ .../templates/flytescheduler/deployment.yaml | 6 ++++++ .../templates/propeller/webhook.yaml | 5 +++++ 4 files changed, 38 insertions(+) diff --git a/charts/flyte-core/templates/admin/deployment.yaml b/charts/flyte-core/templates/admin/deployment.yaml index 5a081224a8..5b41085674 100755 --- a/charts/flyte-core/templates/admin/deployment.yaml +++ b/charts/flyte-core/templates/admin/deployment.yaml @@ -38,6 +38,12 @@ spec: volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 10 }} - mountPath: /etc/flyte/config name: base-config-volume + {{- if .Values.flyteadmin.env }} + env: + {{- with .Values.flyteadmin.env -}} + {{- tpl (toYaml .) $ | nindent 12 }} + {{- end }} + {{- end }} {{- if .Values.flyteadmin.initialProjects }} - command: - flyteadmin @@ -54,6 +60,12 @@ spec: volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 10 }} - mountPath: /etc/flyte/config name: base-config-volume + {{- if .Values.flyteadmin.env }} + env: + {{- with .Values.flyteadmin.env -}} + {{- tpl (toYaml .) $ | nindent 12 }} + {{- end }} + {{- end }} {{- end }} {{- if and (.Values.cluster_resource_manager.enabled) (not .Values.cluster_resource_manager.standalone_deploy) }} - command: @@ -77,6 +89,12 @@ spec: {{ tpl (toYaml .) $ | nindent 10 }} {{- end }} {{- end }} + {{- if .Values.flyteadmin.env }} + env: + {{- with .Values.flyteadmin.env -}} + {{- tpl (toYaml .) $ | nindent 12 }} + {{- end }} + {{- end }} {{- end }} - name: generate-secrets image: "{{ .Values.flyteadmin.image.repository }}:{{ .Values.flyteadmin.image.tag }}" @@ -96,6 +114,9 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + {{- with .Values.flyteadmin.env -}} + {{- tpl (toYaml .) $ | nindent 12 }} + {{- end }} containers: - command: - flyteadmin diff --git a/charts/flyte-core/templates/datacatalog/deployment.yaml b/charts/flyte-core/templates/datacatalog/deployment.yaml index 72c18ac61b..9ba6a8d89a 100644 --- a/charts/flyte-core/templates/datacatalog/deployment.yaml +++ b/charts/flyte-core/templates/datacatalog/deployment.yaml @@ -38,6 +38,12 @@ spec: volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 8 }} - mountPath: /etc/datacatalog/config name: config-volume + {{- if .Values.datacatalog.podEnv }} + env: + {{- with .Values.datacatalog.podEnv }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} containers: - command: - datacatalog diff --git a/charts/flyte-core/templates/flytescheduler/deployment.yaml b/charts/flyte-core/templates/flytescheduler/deployment.yaml index fa5cfc4fd9..37b2394b1d 100755 --- a/charts/flyte-core/templates/flytescheduler/deployment.yaml +++ b/charts/flyte-core/templates/flytescheduler/deployment.yaml @@ -33,6 +33,12 @@ spec: - precheck - --config - {{ .Values.flytescheduler.configPath }} + {{- if .Values.flytescheduler.podEnv }} + env: + {{- with .Values.flytescheduler.podEnv -}} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} image: "{{ .Values.flytescheduler.image.repository }}:{{ .Values.flytescheduler.image.tag }}" imagePullPolicy: "{{ .Values.flytescheduler.image.pullPolicy }}" name: flytescheduler-check diff --git a/charts/flyte-core/templates/propeller/webhook.yaml b/charts/flyte-core/templates/propeller/webhook.yaml index 75866a8c2b..45c7371d66 100644 --- a/charts/flyte-core/templates/propeller/webhook.yaml +++ b/charts/flyte-core/templates/propeller/webhook.yaml @@ -61,6 +61,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + {{- if .Values.flytepropeller.podEnv -}} + {{- with .Values.flytepropeller.podEnv -}} + {{- toYaml . | nindent 10 }} + {{- end }} + {{- end }} volumeMounts: - name: config-volume mountPath: /etc/flyte/config