Browse Source

[Helm chart] Remove createClusterRole dependency from serviceAccount usage from filer statefulset (#5724)

* Remove createClusterRole dependency from serviceAccount usage from filer statefulset

* Add automountServiceAccountToken option for service account.
pull/5726/head
Reddysekhar Gaduputi 6 months ago
committed by GitHub
parent
commit
e99eee8ed9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      k8s/charts/seaweedfs/templates/filer-statefulset.yaml
  2. 3
      k8s/charts/seaweedfs/templates/service-account.yaml
  3. 1
      k8s/charts/seaweedfs/values.yaml

2
k8s/charts/seaweedfs/templates/filer-statefulset.yaml

@ -56,9 +56,7 @@ spec:
{{ tpl .Values.filer.tolerations . | nindent 8 | trim }}
{{- end }}
{{- include "seaweedfs.imagePullSecrets" . | nindent 6 }}
{{- if .Values.global.createClusterRole }}
serviceAccountName: {{ .Values.filer.serviceAccountName | default .Values.global.serviceAccountName | quote }} # for deleting statefulset pods after migration
{{- end }}
terminationGracePeriodSeconds: 60
{{- if .Values.filer.priorityClassName }}
priorityClassName: {{ .Values.filer.priorityClassName | quote }}

3
k8s/charts/seaweedfs/templates/service-account.yaml

@ -7,4 +7,5 @@ metadata:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
automountServiceAccountToken: {{ .Values.global.automountServiceAccountToken }}

1
k8s/charts/seaweedfs/values.yaml

@ -19,6 +19,7 @@ global:
filerRead: false
# we will use this serviceAccountName for all ClusterRoles/ClusterRoleBindings
serviceAccountName: "seaweedfs"
automountServiceAccountToken: true
certificates:
alphacrds: false
monitoring:

Loading…
Cancel
Save