mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/minio] Decouple directory root from the mountPath (#19949)
* [stable/minio] Decouple directory root from the mountPath Introduce a new variable named `.Values.bucketRoot` which defaults to `.Values.mountPath` if unset. This allows the Helm chart to serve only a subset of the mounted drive, which can be useful if the mounted data contains symlinks to locations that should not be accessible directly through minio. Addresses #19939 Signed-off-by: gzur <gzur@gzur.org> * Remove extra spaces Signed-off-by: gzur <gzur@gzur.org>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
e1765723d3
commit
d22fad2086
@@ -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.2
|
||||
version: 5.0.3
|
||||
appVersion: master
|
||||
keywords:
|
||||
- storage
|
||||
|
||||
@@ -115,6 +115,7 @@ The following table lists the configurable parameters of the MinIO chart and the
|
||||
| `certsPath` | Default certs path location | `/etc/minio/certs` |
|
||||
| `configPathmc` | Default config file location for MinIO client - mc | `/etc/minio/mc` |
|
||||
| `mountPath` | Default mount location for persistent drive | `/export` |
|
||||
| `bucketRoot` | Directory from where minio should serve buckets. | Value of `.mountPath` |
|
||||
| `clusterDomain` | domain name of kubernetes cluster where pod is running. | `cluster.local` |
|
||||
| `service.type` | Kubernetes service type | `ClusterIP` |
|
||||
| `service.port` | Kubernetes port where service is exposed | `9000` |
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{{- if eq .Values.mode "standalone" }}
|
||||
{{ $bucketRoot := or ($.Values.bucketRoot) ($.Values.mountPath) }}
|
||||
apiVersion: {{ template "minio.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@@ -91,7 +92,7 @@ spec:
|
||||
{{- if .Values.nasgateway.enabled }}
|
||||
command: [ "/bin/sh",
|
||||
"-ce",
|
||||
"/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway nas {{ .Values.mountPath }}" ]
|
||||
"/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} gateway nas {{ $bucketRoot }}" ]
|
||||
{{- else }}
|
||||
{{- if .Values.b2gateway.enabled }}
|
||||
command: [ "/bin/sh",
|
||||
@@ -100,7 +101,7 @@ spec:
|
||||
{{- else }}
|
||||
command: [ "/bin/sh",
|
||||
"-ce",
|
||||
"/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} server {{ .Values.mountPath }}" ]
|
||||
"/usr/bin/docker-entrypoint.sh minio -S {{ .Values.certsPath }} server {{ $bucketRoot }}" ]
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
{{ $scheme := "https" }}
|
||||
{{ end }}
|
||||
{{ $mountPath := .Values.mountPath }}
|
||||
{{ $bucketRoot := or ($.Values.bucketRoot) ($.Values.mountPath) }}
|
||||
{{ $subPath := .Values.persistence.subPath }}
|
||||
{{ $penabled := .Values.persistence.enabled }}
|
||||
{{ $accessMode := .Values.persistence.accessMode }}
|
||||
@@ -81,7 +82,7 @@ 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 -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)}}{{ $.Values.mountPath }}-{{ `{` }}0...{{ sub $drivesPerNode 1 }}{{ `}` }}{{else}}{{ $.Values.mountPath }}{{end}}{{- end}}" ]
|
||||
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}}" ]
|
||||
{{- if .Values.extraArgs }}
|
||||
args:
|
||||
{{ toYaml .Values.extraArgs | indent 12 }}
|
||||
|
||||
@@ -60,6 +60,11 @@ certsPath: "/etc/minio/certs/"
|
||||
configPathmc: "/etc/minio/mc/"
|
||||
mountPath: "/export"
|
||||
|
||||
## Override the root directory which the minio server should serve from.
|
||||
## If left empty, it defaults to the value of {{ .Values.mountPath }}
|
||||
## If defined, it must be a sub-directory of the path specified in {{ .Values.mountPath }}
|
||||
bucketRoot: ""
|
||||
|
||||
# Number of drives attached to a node
|
||||
drivesPerNode: 1
|
||||
# Number of MinIO containers running
|
||||
|
||||
Reference in New Issue
Block a user