[stable/minio] Support imagePullSecrets for StatefulSet. (#23042)

* [stable/minio] Support imagePullSecrets for StatefulSet.
Signed-off-by: Jonas Rabouli <jonas.h@rabouli.com>

* [stable/minio] Added imagePullSecrets template
Signed-off-by: Jonas Rabouli <jonas.h@rabouli.com>

* [stable/minio] Bumped version
Signed-off-by: Jonas Rabouli <jonas.h@rabouli.com>
This commit is contained in:
Jonas R
2020-07-20 09:08:51 -07:00
committed by GitHub
parent dc10050595
commit 22b6484bab
6 changed files with 30 additions and 4 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
description: MinIO is a high performance data infrastructure for machine learning, analytics and application data workloads.
name: minio
version: 5.0.31
version: 5.0.32
appVersion: master
keywords:
- storage
+25
View File
@@ -94,3 +94,28 @@ Properly format optional additional arguments to Minio binary
{{ " " }}{{ . }}
{{- end -}}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "minio.imagePullSecrets" -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
Also, we can not use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- else if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets }}
{{- end -}}
{{- else if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets }}
{{- end -}}
{{- end -}}
+1 -3
View File
@@ -227,9 +227,7 @@ spec:
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }}
{{- end }}
{{- include "minio.imagePullSecrets" . | indent 6 }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
@@ -25,6 +25,7 @@ spec:
{{- end }}
spec:
restartPolicy: OnFailure
{{- include "minio.imagePullSecrets" . | indent 6 }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
@@ -28,6 +28,7 @@ spec:
serviceAccountName: {{ $fullName }}-update-prometheus-secret
{{- end }}
restartPolicy: OnFailure
{{- include "minio.imagePullSecrets" . | indent 6 }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
+1
View File
@@ -176,6 +176,7 @@ spec:
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- include "minio.imagePullSecrets" . | indent 6 }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}