diff --git a/stable/minio/Chart.yaml b/stable/minio/Chart.yaml index 286404c564..2a1292bdb0 100755 --- a/stable/minio/Chart.yaml +++ b/stable/minio/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: MinIO is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. name: minio -version: 2.4.16 +version: 2.4.17 appVersion: RELEASE.2019-05-14T23-57-45Z keywords: - storage diff --git a/stable/minio/README.md b/stable/minio/README.md index 9b904eaa63..0f8ae9eb85 100755 --- a/stable/minio/README.md +++ b/stable/minio/README.md @@ -115,6 +115,8 @@ The following table lists the configurable parameters of the MinIO chart and the | `service.port` | Kubernetes port where service is exposed| `9000` | | `service.externalIPs` | service external IP addresses | `nil` | | `service.annotations` | Service annotations | `{}` | +| `serviceAccount.create` | Toggle creation of new service account | `true` | +| `serviceAccount.name` | Name of service account to create and/or use | `""` | | `persistence.enabled` | Use persistent volume to store data | `true` | | `persistence.size` | Size of persistent volume claim | `10Gi` | | `persistence.existingClaim`| Use an existing PVC to persist data | `nil` | diff --git a/stable/minio/templates/_helpers.tpl b/stable/minio/templates/_helpers.tpl index c8fe9ba7aa..5939428d48 100644 --- a/stable/minio/templates/_helpers.tpl +++ b/stable/minio/templates/_helpers.tpl @@ -41,3 +41,14 @@ Return the appropriate apiVersion for networkpolicy. {{- print "networking.k8s.io/v1" -}} {{- end -}} {{- end -}} + +{{/* +Determine service account name for deployment or statefulset. +*/}} +{{- define "minio.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} +{{- default (include "minio.fullname" .) .Values.serviceAccount.name | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- default "default" .Values.serviceAccount.name -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/stable/minio/templates/deployment.yaml b/stable/minio/templates/deployment.yaml index 3773dd57ca..7b20eed369 100644 --- a/stable/minio/templates/deployment.yaml +++ b/stable/minio/templates/deployment.yaml @@ -51,6 +51,7 @@ spec: {{- if .Values.priorityClassName }} priorityClassName: "{{ .Values.priorityClassName }}" {{- end }} + serviceAccountName: {{ include "minio.serviceAccountName" . | quote }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/stable/minio/templates/statefulset.yaml b/stable/minio/templates/statefulset.yaml index 1eb6663921..1cdd40afa4 100644 --- a/stable/minio/templates/statefulset.yaml +++ b/stable/minio/templates/statefulset.yaml @@ -50,6 +50,7 @@ spec: {{- if .Values.priorityClassName }} priorityClassName: "{{ .Values.priorityClassName }}" {{- end }} + serviceAccountName: {{ include "minio.serviceAccountName" . | quote }} containers: - name: {{ .Chart.Name }} image: {{ .Values.image.repository }}:{{ .Values.image.tag }} diff --git a/stable/minio/values.yaml b/stable/minio/values.yaml index e23df7e64c..2f6d6f0397 100755 --- a/stable/minio/values.yaml +++ b/stable/minio/values.yaml @@ -249,3 +249,11 @@ environment: networkPolicy: enabled: false allowExternal: true + +## Specify the service account to use for the Minio pods. If 'create' is set to 'false' +## and 'name' is left unspecified, the account 'default' will be used. +serviceAccount: + create: true + ## The name of the service account to use. If 'create' is 'true', a service account with that name + ## will be created. Otherwise, a name will be auto-generated. + name: