From 666a22b9803418a8d0d40573ad01adbb4dbd3fcf Mon Sep 17 00:00:00 2001 From: jessebot Date: Sun, 26 Nov 2023 14:55:54 +0100 Subject: [PATCH] fix defaults for serviceAccountName for each statefulset to follow exact from helm docs helm docs: https://helm.sh/docs/chart_template_guide/functions_and_pipelines/#using-the-default-function --- k8s/charts/seaweedfs/templates/filer-statefulset.yaml | 2 +- k8s/charts/seaweedfs/templates/master-statefulset.yaml | 2 +- k8s/charts/seaweedfs/templates/volume-statefulset.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml index cec425b80..a92d3cdd1 100644 --- a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml @@ -52,7 +52,7 @@ spec: {{- end }} {{- include "seaweedfs.imagePullSecrets" . | nindent 6 }} {{- if .Values.global.createClusterRole }} - serviceAccountName: {{ default .Values.global.serviceAccountName .Values.filer.serviceAccountName }} # for deleting statefulset pods after migration + serviceAccountName: {{ .Values.filer.serviceAccountName | default .Values.global.serviceAccountName | quote }} # for deleting statefulset pods after migration {{- end }} terminationGracePeriodSeconds: 60 {{- if .Values.filer.priorityClassName }} diff --git a/k8s/charts/seaweedfs/templates/master-statefulset.yaml b/k8s/charts/seaweedfs/templates/master-statefulset.yaml index 03509029c..db36d4ab6 100644 --- a/k8s/charts/seaweedfs/templates/master-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/master-statefulset.yaml @@ -56,7 +56,7 @@ spec: {{- end }} enableServiceLinks: false {{- if .Values.global.createClusterRole }} - serviceAccountName: {{ default .Values.global.serviceAccountName .Values.master.serviceAccountName }} # for deleting statefulset pods after migration + serviceAccountName: {{ .Values.master.serviceAccountName | default .Values.global.serviceAccountName | quote }} # for deleting statefulset pods after migration {{- end }} {{- if .Values.master.initContainers }} initContainers: diff --git a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml index cef34a2c5..e74311673 100644 --- a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml @@ -50,7 +50,7 @@ spec: {{- end }} enableServiceLinks: false {{- if .Values.global.createClusterRole }} - serviceAccountName: {{ default .Values.global.serviceAccountName .Values.volume.serviceAccountName }} # for deleting statefulset pods after migration + serviceAccountName: {{ .Values.volume.serviceAccountName | default .Values.global.serviceAccountName | quote }} # for deleting statefulset pods after migration {{- end }} {{- $initContainers_exists := include "volume.initContainers_exists" . -}} {{- if $initContainers_exists }}