20089-minio-extraargs: fix extraArgs values being ignored by minio binary inside pod (#20091)

Signed-off-by: Huy Tran <huyntran@outlook.com>

Co-authored-by: Huy Tran <huy.tran@greenbird.com>
This commit is contained in:
hutr
2020-04-08 17:31:43 -07:00
committed by GitHub
co-authored by Huy Tran
parent cef9005d35
commit 4124bcd421
4 changed files with 10 additions and 18 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -91,6 +91,6 @@ Properly format optional additional arguments to Minio binary
*/}}
{{- define "minio.extraArgs" -}}
{{- range .Values.extraArgs -}}
,{{ . | quote }}
{{ " " }}{{ . }}
{{- end -}}
{{- end -}}
+7 -14
View File
@@ -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 }}
+1 -2
View File
@@ -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) }}