From b52bbe206950a95d476865bd9f39cb1cf1974ac6 Mon Sep 17 00:00:00 2001 From: gdabisias <143190185+gdabisias@users.noreply.github.com> Date: Wed, 27 Sep 2023 15:57:35 +0200 Subject: [PATCH] Fix flyte-core helm charts for multi cluster configuration (#3993) * Fix cluster secrets access for flyte-core helm charts when used in multi-cluster setup Signed-off-by: gdabisias * Fix init container secret Signed-off-by: gdabisias * Fix secret name Signed-off-by: gdabisias * Generalise volume mounting points Signed-off-by: gdabisias --------- Signed-off-by: gdabisias --- charts/flyte-core/templates/admin/deployment.yaml | 5 +++++ .../templates/clusterresourcesync/deployment.yaml | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/charts/flyte-core/templates/admin/deployment.yaml b/charts/flyte-core/templates/admin/deployment.yaml index 97deb99457..8b6dff34af 100755 --- a/charts/flyte-core/templates/admin/deployment.yaml +++ b/charts/flyte-core/templates/admin/deployment.yaml @@ -72,6 +72,11 @@ spec: name: clusters-config-volume - mountPath: /etc/secrets/ name: admin-secrets + {{- if gt (len .Values.configmap.clusters.labelClusterMap) 0 }} + {{- with .Values.flyteadmin.additionalVolumeMounts -}} + {{ tpl (toYaml .) $ | nindent 10 }} + {{- end }} + {{- end }} {{- end }} - name: generate-secrets image: "{{ .Values.flyteadmin.image.repository }}:{{ .Values.flyteadmin.image.tag }}" diff --git a/charts/flyte-core/templates/clusterresourcesync/deployment.yaml b/charts/flyte-core/templates/clusterresourcesync/deployment.yaml index b89a599ab7..bf13c08080 100644 --- a/charts/flyte-core/templates/clusterresourcesync/deployment.yaml +++ b/charts/flyte-core/templates/clusterresourcesync/deployment.yaml @@ -41,7 +41,7 @@ spec: name: config-volume {{- if gt (len .Values.configmap.clusters.labelClusterMap) 0 }} - mountPath: /var/run/credentials - name: flyte-admin-secrets + name: cluster-secrets {{- end }} serviceAccountName: {{ .Values.cluster_resource_manager.service_account_name }} {{- if .Values.cluster_resource_manager.resources }} @@ -55,9 +55,9 @@ spec: name: flyte-clusterresourcesync-config name: config-volume {{- if gt (len .Values.configmap.clusters.labelClusterMap) 0 }} - - name: flyte-admin-secrets + - name: cluster-secrets secret: - secretName: flyte-admin-secrets + secretName: cluster-credentials {{- end }} {{- if .Values.cluster_resource_manager.config.cluster_resources.standaloneDeployment }} - name: auth