From c7dcbfd6c171806b4d89f1897d6c8485ce911eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0afa=C5=99=C3=ADk?= Date: Mon, 19 Sep 2022 20:06:16 +0200 Subject: [PATCH] helm: specify service account for the jobs (#15706) --- helm/minio/templates/post-install-create-bucket-job.yaml | 3 +++ helm/minio/templates/post-install-create-policy-job.yaml | 3 +++ helm/minio/templates/post-install-create-user-job.yaml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/helm/minio/templates/post-install-create-bucket-job.yaml b/helm/minio/templates/post-install-create-bucket-job.yaml index 3d5d0564a..643313d51 100644 --- a/helm/minio/templates/post-install-create-bucket-job.yaml +++ b/helm/minio/templates/post-install-create-bucket-job.yaml @@ -68,6 +68,9 @@ spec: {{- if .Values.makeBucketJob.extraVolumes }} {{- toYaml .Values.makeBucketJob.extraVolumes | nindent 8 }} {{- end }} +{{ if .Values.serviceAccount.create }} + serviceAccountName: {{ .Values.serviceAccount.name }} +{{- end }} containers: - name: minio-mc image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}" diff --git a/helm/minio/templates/post-install-create-policy-job.yaml b/helm/minio/templates/post-install-create-policy-job.yaml index 6ffe4cf90..288bf751a 100644 --- a/helm/minio/templates/post-install-create-policy-job.yaml +++ b/helm/minio/templates/post-install-create-policy-job.yaml @@ -68,6 +68,9 @@ spec: {{- if .Values.makePolicyJob.extraVolumes }} {{- toYaml .Values.makePolicyJob.extraVolumes | nindent 8 }} {{- end }} +{{ if .Values.serviceAccount.create }} + serviceAccountName: {{ .Values.serviceAccount.name }} +{{- end }} containers: - name: minio-mc image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}" diff --git a/helm/minio/templates/post-install-create-user-job.yaml b/helm/minio/templates/post-install-create-user-job.yaml index f471fec5f..8ccc6c000 100644 --- a/helm/minio/templates/post-install-create-user-job.yaml +++ b/helm/minio/templates/post-install-create-user-job.yaml @@ -78,6 +78,9 @@ spec: {{- if .Values.makeUserJob.extraVolumes }} {{- toYaml .Values.makeUserJob.extraVolumes | nindent 8 }} {{- end }} +{{ if .Values.serviceAccount.create }} + serviceAccountName: {{ .Values.serviceAccount.name }} +{{- end }} containers: - name: minio-mc image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"