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" . -}}