[stable/minio] Add serviceAccount option for deployed pods (#14917)

* Add serviceAccount option for deployed pods

Signed-off-by: Tyler Camp <tylermatthewcamp@gmail.com>

* Bump minio chart version

Signed-off-by: Tyler Camp <tylermatthewcamp@gmail.com>

* Add trailing newline to values.yaml

Signed-off-by: Tyler Camp <tylermatthewcamp@gmail.com>
This commit is contained in:
Tyler Camp
2019-06-27 20:53:32 -07:00
committed by Kubernetes Prow Robot
parent 8547a7bcba
commit 6286386cf6
6 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -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
+2
View File
@@ -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` |
+11
View File
@@ -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 -}}
+1
View File
@@ -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 }}"
+1
View File
@@ -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 }}
+8
View File
@@ -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: