diff --git a/stable/minio/Chart.yaml b/stable/minio/Chart.yaml index 06f80613f4..945b72c309 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: 3.0.4 +version: 3.0.5 appVersion: master keywords: - storage diff --git a/stable/minio/README.md b/stable/minio/README.md index 0e31b8d1db..ebaecccb1c 100755 --- a/stable/minio/README.md +++ b/stable/minio/README.md @@ -106,6 +106,7 @@ The following table lists the configurable parameters of the MinIO chart and the | `extraArgs` | Additional command line arguments to pass to the MinIO server | `[]` | | `replicas` | Number of nodes (applicable only for MinIO distributed mode). | `4` | | `zones` | Number of zones (applicable only for MinIO distributed mode). | `1` | +| `drivesPerNode` | Number of drives per node (applicable only for MinIO distributed mode). | `1` | | `existingSecret` | Name of existing secret with access and secret key. | `""` | | `accessKey` | Default access key (5 to 20 characters) | `AKIAIOSFODNN7EXAMPLE` | | `secretKey` | Default secret key (8 to 40 characters) | `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` | diff --git a/stable/minio/templates/statefulset.yaml b/stable/minio/templates/statefulset.yaml index 7920dddcd5..4e083697da 100644 --- a/stable/minio/templates/statefulset.yaml +++ b/stable/minio/templates/statefulset.yaml @@ -1,10 +1,17 @@ {{- if eq .Values.mode "distributed" }} {{ $zoneCount := .Values.zones | int }} {{ $nodeCount := .Values.replicas | int }} +{{ $drivesPerNode := .Values.drivesPerNode | int }} {{ $scheme := "http" }} {{- if .Values.tls.enabled }} {{ $scheme := "https" }} {{ end }} +{{ $mountPath := .Values.mountPath }} +{{ $subPath := .Values.persistence.subPath }} +{{ $penabled := .Values.persistence.enabled }} +{{ $accessMode := .Values.persistence.accessMode }} +{{ $storageClass := .Values.persistence.storageClass }} +{{ $psize := .Values.persistence.size }} apiVersion: v1 kind: Service metadata: @@ -67,19 +74,21 @@ spec: - name: {{ .Chart.Name }} image: {{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} - command: [ "/bin/sh", "-ce", "/usr/bin/docker-entrypoint.sh minio -C {{ .Values.configPath }} server {{- range $i := until $zoneCount }}{{ $factor := mul $i $nodeCount }}{{ $endIndex := add $factor $nodeCount }}{{ $beginIndex := mul $i $nodeCount }} {{ $scheme }}://{{ template `minio.fullname` $ }}-{{ `{` }}{{ $beginIndex }}...{{ sub $endIndex 1 }}{{ `}`}}.{{ template `minio.fullname` $ }}-svc.{{ $.Release.Namespace }}.svc.{{ $.Values.clusterDomain }}{{ $.Values.mountPath }} {{- end}}" ] + command: [ "/bin/sh", "-ce", "/usr/bin/docker-entrypoint.sh minio -C {{ .Values.configPath }} server {{- range $i := until $zoneCount }}{{ $factor := mul $i $nodeCount }}{{ $endIndex := add $factor $nodeCount }}{{ $beginIndex := mul $i $nodeCount }} {{ $scheme }}://{{ template `minio.fullname` $ }}-{{ `{` }}{{ $beginIndex }}...{{ sub $endIndex 1 }}{{ `}`}}.{{ template `minio.fullname` $ }}-svc.{{ $.Release.Namespace }}.svc.{{ $.Values.clusterDomain }}{{ $.Values.mountPath }}-{{ `{` }}0...{{ sub $drivesPerNode 1 }}{{ `}` }}{{- end}}" ] {{- if .Values.extraArgs }} args: {{ toYaml .Values.extraArgs | indent 12 }} {{- end }} volumeMounts: - {{- if .Values.persistence.enabled }} - - name: export - mountPath: {{ .Values.mountPath }} - {{- if and .Values.persistence.enabled .Values.persistence.subPath }} - subPath: "{{ .Values.persistence.subPath }}" + {{- if $penabled }} + {{- range $i := until $drivesPerNode }} + - name: export-{{ $i }} + mountPath: {{ $mountPath }}-{{ $i }} + {{- if and $penabled $subPath }} + subPath: {{ $subPath }} {{- end }} - {{ end }} + {{- end }} + {{- end }} - name: minio-config-dir mountPath: {{ .Values.configPath }} {{- if .Values.tls.enabled }} @@ -152,15 +161,17 @@ spec: {{ end }} {{- if .Values.persistence.enabled }} volumeClaimTemplates: + {{- range $diskId := until $drivesPerNode}} - metadata: - name: export + name: export-{{ $diskId }} spec: - accessModes: [ {{ .Values.persistence.accessMode | quote }} ] - {{- if .Values.persistence.storageClass }} - storageClassName: {{ .Values.persistence.storageClass }} + accessModes: [ {{ $accessMode | quote }} ] + {{- if $storageClass }} + storageClassName: {{ $storageClass }} {{- end }} resources: requests: - storage: {{ .Values.persistence.size }} + storage: {{ $psize }} + {{- end }} {{ end }} {{- end }} diff --git a/stable/minio/values.yaml b/stable/minio/values.yaml index 07bbcb9131..2b1073dc17 100755 --- a/stable/minio/values.yaml +++ b/stable/minio/values.yaml @@ -51,6 +51,8 @@ secretKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" configPath: "/root/.minio/" configPathmc: "/root/.mc/" mountPath: "/export" +# Number of drives attached to a node +drivesPerNode: 8 replicas: 4 zones: 1