From 4124bcd421013b277bc9dfd01082fb0cc685ff6a Mon Sep 17 00:00:00 2001 From: hutr Date: Thu, 9 Apr 2020 02:31:43 +0200 Subject: [PATCH] 20089-minio-extraargs: fix extraArgs values being ignored by minio binary inside pod (#20091) Signed-off-by: Huy Tran Co-authored-by: Huy Tran --- stable/minio/Chart.yaml | 2 +- stable/minio/templates/_helpers.tpl | 2 +- stable/minio/templates/deployment.yaml | 21 +++++++-------------- stable/minio/templates/statefulset.yaml | 3 +-- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/stable/minio/Chart.yaml b/stable/minio/Chart.yaml index cef7fafde1..b1681ad2fd 100755 --- a/stable/minio/Chart.yaml +++ b/stable/minio/Chart.yaml @@ -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.19 +version: 5.0.20 appVersion: master keywords: - storage diff --git a/stable/minio/templates/_helpers.tpl b/stable/minio/templates/_helpers.tpl index 0b083a117c..ef929d39b6 100644 --- a/stable/minio/templates/_helpers.tpl +++ b/stable/minio/templates/_helpers.tpl @@ -91,6 +91,6 @@ Properly format optional additional arguments to Minio binary */}} {{- define "minio.extraArgs" -}} {{- range .Values.extraArgs -}} -,{{ . | quote }} +{{ " " }}{{ . }} {{- end -}} {{- end -}} diff --git a/stable/minio/templates/deployment.yaml b/stable/minio/templates/deployment.yaml index 2d53fcf492..64eaad0b89 100644 --- a/stable/minio/templates/deployment.yaml +++ b/stable/minio/templates/deployment.yaml @@ -73,43 +73,36 @@ spec: {{- if .Values.s3gateway.enabled }} command: [ "/bin/sh", "-ce", - "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway s3 {{ .Values.s3gateway.serviceEndpoint }}" - {{- template "minio.extraArgs" . }} ] + "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway s3 {{ .Values.s3gateway.serviceEndpoint }} {{- template `minio.extraArgs` . }}" ] {{- else }} {{- if .Values.azuregateway.enabled }} command: [ "/bin/sh", "-ce", - "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway azure" - {{- template "minio.extraArgs" . }} ] + "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway azure {{- template `minio.extraArgs` . }}" ] {{- else }} {{- if .Values.gcsgateway.enabled }} command: [ "/bin/sh", "-ce", - "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway gcs {{ .Values.gcsgateway.projectId }}" - {{- template "minio.extraArgs" . }} ] + "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway gcs {{ .Values.gcsgateway.projectId }} {{- template `minio.extraArgs` . }}" ] {{- else }} {{- if .Values.ossgateway.enabled }} command: [ "/bin/sh", "-ce", - "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway oss {{ .Values.ossgateway.endpointURL }}" - {{- template "minio.extraArgs" . }} ] + "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway oss {{ .Values.ossgateway.endpointURL }} {{- template `minio.extraArgs` . }}" ] {{- else }} {{- if .Values.nasgateway.enabled }} command: [ "/bin/sh", "-ce", - "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway nas {{ $bucketRoot }}" - {{- template "minio.extraArgs" . }} ] + "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway nas {{ $bucketRoot }} {{- template `minio.extraArgs` . }}" ] {{- else }} {{- if .Values.b2gateway.enabled }} command: [ "/bin/sh", "-ce", - "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway b2" - {{- template "minio.extraArgs" . }} ] + "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway b2 {{- template `minio.extraArgs` . }}" ] {{- else }} command: [ "/bin/sh", "-ce", - "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} server {{ $bucketRoot }}" - {{- template "minio.extraArgs" . }} ] + "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} server {{ $bucketRoot }} {{- template `minio.extraArgs` . }}" ] {{- end }} {{- end }} {{- end }} diff --git a/stable/minio/templates/statefulset.yaml b/stable/minio/templates/statefulset.yaml index 49f3a014b1..8fb48a9346 100644 --- a/stable/minio/templates/statefulset.yaml +++ b/stable/minio/templates/statefulset.yaml @@ -90,8 +90,7 @@ spec: command: [ "/bin/sh", "-ce", - "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} 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 }}{{if (gt $drivesPerNode 1)}}{{ $bucketRoot }}-{{ `{` }}0...{{ sub $drivesPerNode 1 }}{{ `}` }}{{else}}{{ $bucketRoot }}{{end}}{{- end}}" - {{- template "minio.extraArgs" . }} ] + "/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} 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 }}{{if (gt $drivesPerNode 1)}}{{ $bucketRoot }}-{{ `{` }}0...{{ sub $drivesPerNode 1 }}{{ `}` }}{{else}}{{ $bucketRoot }}{{end}}{{- end}}{{- template `minio.extraArgs` . }}" ] volumeMounts: {{- if $penabled }} {{- if (gt $drivesPerNode 1) }}