From 0f7aa4125f85ec41ff006d954f3f770dea6dc0cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0afa=C5=99=C3=ADk?= Date: Tue, 23 Aug 2022 20:15:26 +0200 Subject: [PATCH] helm: add extra volumes and extra volume mounts option (#15568) - add a new line to the end of the credentials file when creating a user - add extra volumes and mounts option into helm chart --- helm/minio/templates/deployment.yaml | 6 ++++++ helm/minio/templates/statefulset.yaml | 6 ++++++ helm/minio/values.yaml | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/helm/minio/templates/deployment.yaml b/helm/minio/templates/deployment.yaml index 321692637..692f86efd 100644 --- a/helm/minio/templates/deployment.yaml +++ b/helm/minio/templates/deployment.yaml @@ -92,6 +92,9 @@ spec: mountPath: "/tmp/minio-config-env" {{- end }} {{- include "minio.tlsKeysVolumeMount" . | indent 12 }} + {{- if .Values.extraVolumeMounts }} + {{- toYaml .Values.extraVolumeMounts | nindent 12 }} + {{- end }} ports: - name: {{ $scheme }} containerPort: {{ .Values.minioAPIPort }} @@ -190,4 +193,7 @@ spec: secret: secretName: {{ template "minio.secretName" . }} {{- include "minio.tlsKeysVolume" . | indent 8 }} + {{- if .Values.extraVolumes }} + {{ toYaml .Values.extraVolumes | nindent 8 }} + {{- end }} {{- end }} diff --git a/helm/minio/templates/statefulset.yaml b/helm/minio/templates/statefulset.yaml index 6d695ddf5..490de918d 100644 --- a/helm/minio/templates/statefulset.yaml +++ b/helm/minio/templates/statefulset.yaml @@ -130,6 +130,9 @@ spec: mountPath: "/tmp/minio-config-env" {{- end }} {{- include "minio.tlsKeysVolumeMount" . | indent 12 }} + {{- if .Values.extraVolumeMounts }} + {{- toYaml .Values.extraVolumeMounts | nindent 12 }} + {{- end }} ports: - name: {{ $scheme }} containerPort: {{ .Values.minioAPIPort }} @@ -207,6 +210,9 @@ spec: secretName: {{ .Values.extraSecret }} {{- end }} {{- include "minio.tlsKeysVolume" . | indent 8 }} + {{- if .Values.extraVolumes }} + {{ toYaml .Values.extraVolumes | nindent 8 }} + {{- end }} {{- if .Values.persistence.enabled }} volumeClaimTemplates: {{- if gt $drivesPerNode 1 }} diff --git a/helm/minio/values.yaml b/helm/minio/values.yaml index 220c01da6..2ca201f18 100644 --- a/helm/minio/values.yaml +++ b/helm/minio/values.yaml @@ -46,6 +46,12 @@ ignoreChartChecksums: false ## Additional arguments to pass to minio binary extraArgs: [] +## Additional volumes to minio container +extraVolumes: [] + +## Additional volumeMounts to minio container +extraVolumeMounts: [] + ## Internal port number for MinIO S3 API container ## Change service.port to change external port number minioAPIPort: "9000"