From 78f6c27cc4809163e47c1f0416e8526c738aa477 Mon Sep 17 00:00:00 2001 From: Ryan Lo Date: Sat, 17 Feb 2024 18:57:20 +0800 Subject: [PATCH 1/3] fix: mount flyte-secret-auth secret conditionally Signed-off-by: Ryan Lo --- charts/flyte-core/templates/flytescheduler/deployment.yaml | 2 ++ charts/flyte-core/templates/propeller/deployment.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/charts/flyte-core/templates/flytescheduler/deployment.yaml b/charts/flyte-core/templates/flytescheduler/deployment.yaml index 8e6cd2a4ea..4848cdc7c0 100755 --- a/charts/flyte-core/templates/flytescheduler/deployment.yaml +++ b/charts/flyte-core/templates/flytescheduler/deployment.yaml @@ -91,9 +91,11 @@ spec: - configMap: name: flyte-scheduler-config name: config-volume + {{- if .Values.secrets.adminOauthClientCredentials.enabled }} - name: auth secret: secretName: flyte-secret-auth + {{- end }} {{- with .Values.flytescheduler.additionalVolumes -}} {{ tpl (toYaml .) $ | nindent 6 }} {{- end }} diff --git a/charts/flyte-core/templates/propeller/deployment.yaml b/charts/flyte-core/templates/propeller/deployment.yaml index d24101582b..9f0b862a77 100644 --- a/charts/flyte-core/templates/propeller/deployment.yaml +++ b/charts/flyte-core/templates/propeller/deployment.yaml @@ -98,9 +98,11 @@ spec: - configMap: name: flyte-propeller-config name: config-volume + {{- if .Values.secrets.adminOauthClientCredentials.enabled }} - name: auth secret: secretName: flyte-secret-auth + {{- end }} {{- with .Values.flytepropeller.additionalVolumes -}} {{ tpl (toYaml .) $ | nindent 6 }} {{- end }} From 34c20ddad63682dd956598943c11458e661097ee Mon Sep 17 00:00:00 2001 From: Ryan Lo Date: Sat, 17 Feb 2024 19:50:52 +0800 Subject: [PATCH 2/3] add conditions for propeller/manager.yaml & /clusterresourcesync/deployment.yaml Signed-off-by: Ryan Lo --- charts/flyte-core/templates/clusterresourcesync/deployment.yaml | 2 ++ charts/flyte-core/templates/propeller/manager.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/charts/flyte-core/templates/clusterresourcesync/deployment.yaml b/charts/flyte-core/templates/clusterresourcesync/deployment.yaml index 7fb93c9b92..b84e86b851 100644 --- a/charts/flyte-core/templates/clusterresourcesync/deployment.yaml +++ b/charts/flyte-core/templates/clusterresourcesync/deployment.yaml @@ -66,10 +66,12 @@ spec: secretName: cluster-credentials {{- end }} {{- if .Values.cluster_resource_manager.config.cluster_resources.standaloneDeployment }} + {{- if .Values.secrets.adminOauthClientCredentials.enabled }} - name: auth secret: secretName: flyte-secret-auth {{- end }} + {{- end }} {{- with .Values.cluster_resource_manager.nodeSelector }} nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} diff --git a/charts/flyte-core/templates/propeller/manager.yaml b/charts/flyte-core/templates/propeller/manager.yaml index 875d05dab4..e91d8400f3 100644 --- a/charts/flyte-core/templates/propeller/manager.yaml +++ b/charts/flyte-core/templates/propeller/manager.yaml @@ -53,9 +53,11 @@ template: - configMap: name: flyte-propeller-config name: config-volume + {{- if .Values.secrets.adminOauthClientCredentials.enabled }} - name: auth secret: secretName: flyte-secret-auth + {{- end }} {{- with .Values.flytepropeller.nodeSelector }} nodeSelector: {{ tpl (toYaml .) $ | nindent 6 }} {{- end }} From c414df3f7ef80e7730f053d2d9f72d3041f1be0f Mon Sep 17 00:00:00 2001 From: Ryan Lo Date: Sat, 17 Feb 2024 19:58:58 +0800 Subject: [PATCH 3/3] conditional volumeMount Signed-off-by: Ryan Lo --- charts/flyte-core/templates/clusterresourcesync/deployment.yaml | 2 ++ charts/flyte-core/templates/flytescheduler/deployment.yaml | 2 ++ charts/flyte-core/templates/propeller/deployment.yaml | 2 ++ charts/flyte-core/templates/propeller/manager.yaml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/charts/flyte-core/templates/clusterresourcesync/deployment.yaml b/charts/flyte-core/templates/clusterresourcesync/deployment.yaml index b84e86b851..19c0b9c48a 100644 --- a/charts/flyte-core/templates/clusterresourcesync/deployment.yaml +++ b/charts/flyte-core/templates/clusterresourcesync/deployment.yaml @@ -38,9 +38,11 @@ spec: {{- if not .Values.cluster_resource_manager.config.cluster_resources.standaloneDeployment }} {{- include "databaseSecret.volumeMount" . | nindent 10 }} {{- else }} + {{- if .Values.secrets.adminOauthClientCredentials.enabled }} - name: auth mountPath: /etc/secrets/ {{- end }} + {{- end }} - mountPath: /etc/flyte/clusterresource/templates name: resource-templates - mountPath: /etc/flyte/config diff --git a/charts/flyte-core/templates/flytescheduler/deployment.yaml b/charts/flyte-core/templates/flytescheduler/deployment.yaml index 4848cdc7c0..aa22a13e09 100755 --- a/charts/flyte-core/templates/flytescheduler/deployment.yaml +++ b/charts/flyte-core/templates/flytescheduler/deployment.yaml @@ -76,8 +76,10 @@ spec: volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 8 }} - mountPath: /etc/flyte/config name: config-volume + {{- if .Values.secrets.adminOauthClientCredentials.enabled }} - name: auth mountPath: /etc/secrets/ + {{- end }} {{- with .Values.flytescheduler.additionalVolumeMounts -}} {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} diff --git a/charts/flyte-core/templates/propeller/deployment.yaml b/charts/flyte-core/templates/propeller/deployment.yaml index 9f0b862a77..5fd09e5d5d 100644 --- a/charts/flyte-core/templates/propeller/deployment.yaml +++ b/charts/flyte-core/templates/propeller/deployment.yaml @@ -82,8 +82,10 @@ spec: volumeMounts: - name: config-volume mountPath: /etc/flyte/config + {{- if .Values.secrets.adminOauthClientCredentials.enabled }} - name: auth mountPath: /etc/secrets/ + {{- end }} {{- with .Values.flytepropeller.additionalVolumeMounts -}} {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} diff --git a/charts/flyte-core/templates/propeller/manager.yaml b/charts/flyte-core/templates/propeller/manager.yaml index e91d8400f3..21eb894ba8 100644 --- a/charts/flyte-core/templates/propeller/manager.yaml +++ b/charts/flyte-core/templates/propeller/manager.yaml @@ -43,8 +43,10 @@ template: volumeMounts: - name: config-volume mountPath: /etc/flyte/config + {{- if .Values.secrets.adminOauthClientCredentials.enabled }} - name: auth mountPath: /etc/secrets/ + {{- end }} {{- if .Values.flytepropeller.terminationMessagePolicy }} terminationMessagePolicy: "{{ .Values.flytepropeller.terminationMessagePolicy }}" {{- end }}