From 906548d0ba160d3ec3e45133c03f39b0c0af705c Mon Sep 17 00:00:00 2001 From: vinzenzs <53528895+vinzenzs@users.noreply.github.com> Date: Wed, 1 Dec 2021 00:25:30 +0100 Subject: [PATCH] Added the service account to deloyments and statefulset (#13790) --- helm/minio/templates/deployment.yaml | 3 +++ helm/minio/templates/gateway-deployment.yaml | 3 +++ helm/minio/templates/statefulset.yaml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/helm/minio/templates/deployment.yaml b/helm/minio/templates/deployment.yaml index ca897ee8c..fec9e304a 100644 --- a/helm/minio/templates/deployment.yaml +++ b/helm/minio/templates/deployment.yaml @@ -58,6 +58,9 @@ spec: runAsUser: {{ .Values.securityContext.runAsUser }} runAsGroup: {{ .Values.securityContext.runAsGroup }} fsGroup: {{ .Values.securityContext.fsGroup }} +{{- end }} +{{ if .Values.serviceAccount.create }} + serviceAccountName: {{ .Values.serviceAccount.name }} {{- end }} containers: - name: {{ .Chart.Name }} diff --git a/helm/minio/templates/gateway-deployment.yaml b/helm/minio/templates/gateway-deployment.yaml index 753b087d2..c467b82bc 100644 --- a/helm/minio/templates/gateway-deployment.yaml +++ b/helm/minio/templates/gateway-deployment.yaml @@ -58,6 +58,9 @@ spec: runAsUser: {{ .Values.securityContext.runAsUser }} runAsGroup: {{ .Values.securityContext.runAsGroup }} fsGroup: {{ .Values.securityContext.fsGroup }} +{{- end }} +{{ if .Values.serviceAccount.create }} + serviceAccountName: {{ .Values.serviceAccount.name }} {{- end }} containers: - name: {{ .Chart.Name }} diff --git a/helm/minio/templates/statefulset.yaml b/helm/minio/templates/statefulset.yaml index 787a66d92..8e3ecf5e1 100644 --- a/helm/minio/templates/statefulset.yaml +++ b/helm/minio/templates/statefulset.yaml @@ -84,6 +84,9 @@ spec: runAsUser: {{ .Values.securityContext.runAsUser }} runAsGroup: {{ .Values.securityContext.runAsGroup }} fsGroup: {{ .Values.securityContext.fsGroup }} +{{- end }} +{{ if .Values.serviceAccount.create }} + serviceAccountName: {{ .Values.serviceAccount.name }} {{- end }} containers: - name: {{ .Chart.Name }}