mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Add drivesPerNode to add more drives per node in distributed mode (#19546)
Signed-off-by: Krishnan Parthasarathi <krishnan.parthasarathi@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
e85a94fd2f
commit
ca654b07f8
@@ -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
|
||||
|
||||
@@ -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` |
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user