From d198fd8af707469e7c3c09d16eb385051a2ef0f7 Mon Sep 17 00:00:00 2001 From: jessebot Date: Sun, 26 Nov 2023 14:25:49 +0100 Subject: [PATCH] fix when we create serviceAccount value for master and volume statefulsets to be when global.createClusterRole is set to true --- k8s/charts/seaweedfs/templates/master-statefulset.yaml | 2 +- k8s/charts/seaweedfs/templates/volume-statefulset.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/k8s/charts/seaweedfs/templates/master-statefulset.yaml b/k8s/charts/seaweedfs/templates/master-statefulset.yaml index 081e9ec2a..03509029c 100644 --- a/k8s/charts/seaweedfs/templates/master-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/master-statefulset.yaml @@ -55,7 +55,7 @@ spec: priorityClassName: {{ .Values.master.priorityClassName | quote }} {{- end }} enableServiceLinks: false - {{- if .Values.master.serviceAccountName }} + {{- if .Values.global.createClusterRole }} serviceAccountName: {{ default .Values.global.serviceAccountName .Values.master.serviceAccountName }} # for deleting statefulset pods after migration {{- end }} {{- if .Values.master.initContainers }} diff --git a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml index d12319546..cef34a2c5 100644 --- a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml @@ -49,7 +49,7 @@ spec: priorityClassName: {{ .Values.volume.priorityClassName | quote }} {{- end }} enableServiceLinks: false - {{- if .Values.volume.serviceAccountName }} + {{- if .Values.global.createClusterRole }} serviceAccountName: {{ default .Values.global.serviceAccountName .Values.volume.serviceAccountName }} # for deleting statefulset pods after migration {{- end }} {{- $initContainers_exists := include "volume.initContainers_exists" . -}}