From d6f344368fec2fba30d150ad4154b0bb9e898ece Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 23 Dec 2019 19:23:30 -0800 Subject: [PATCH] Fix single disk distributed deployment (#19758) Signed-off-by: Harshavardhana --- stable/minio/Chart.yaml | 4 ++-- stable/minio/templates/statefulset.yaml | 25 +++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/stable/minio/Chart.yaml b/stable/minio/Chart.yaml index cc0e384e38..e5cf80e9fc 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. +description: MinIO is a high performance data infrastructure for machine learning, analytics and application data workloads. name: minio -version: 4.0.1 +version: 4.0.2 appVersion: master keywords: - storage diff --git a/stable/minio/templates/statefulset.yaml b/stable/minio/templates/statefulset.yaml index d69dd55064..5d452a4518 100644 --- a/stable/minio/templates/statefulset.yaml +++ b/stable/minio/templates/statefulset.yaml @@ -81,6 +81,7 @@ spec: {{- end }} volumeMounts: {{- if $penabled }} + {{- if (gt $drivesPerNode 1) }} {{- range $i := until $drivesPerNode }} - name: export-{{ $i }} mountPath: {{ $mountPath }}-{{ $i }} @@ -88,6 +89,13 @@ spec: subPath: {{ $subPath }} {{- end }} {{- end }} + {{- else }} + - name: export + mountPath: {{ $mountPath }} + {{- if and $penabled $subPath }} + subPath: {{ $subPath }} + {{- end }} + {{- end }} {{- end }} - name: minio-config-dir mountPath: {{ .Values.configPath }} @@ -161,6 +169,7 @@ spec: {{ end }} {{- if .Values.persistence.enabled }} volumeClaimTemplates: + {{- if gt $drivesPerNode 1 }} {{- range $diskId := until $drivesPerNode}} - metadata: name: export-{{ $diskId }} @@ -172,6 +181,18 @@ spec: resources: requests: storage: {{ $psize }} - {{- end }} -{{ end }} + {{- end }} + {{- else }} + - metadata: + name: export + spec: + accessModes: [ {{ $accessMode | quote }} ] + {{- if $storageClass }} + storageClassName: {{ $storageClass }} + {{- end }} + resources: + requests: + storage: {{ $psize }} + {{- end }} +{{- end }} {{- end }}