[stable/minio] Add subpath for /export volume (#2534)

* feat(stable/minio): add subpath for /export volume

Conditionally adds the subPath for the /export volume mount.
Works only if `persistence.enabled` is true and `persistence.subPath`
is not empty string.

This is handy in cases where the volume plugin doesn't
support sub folder mounting. GlusterFS plugin, for example doesn't support
it whereas NFS actually does.

* docs(stable/minio): add subPath to Configuration table

* chore(stable/minio): version bump

* chore(stable/minio): another version bump to keep ahead of master
This commit is contained in:
Rio Kierkels
2017-12-01 13:50:54 -08:00
committed by Vic Iglesias
parent db835c0861
commit a7e736febe
4 changed files with 12 additions and 0 deletions
+1
View File
@@ -89,6 +89,7 @@ The following tables lists the configurable parameters of the Minio chart and th
| `persistence.size` | Size of persistent volume claim | `10Gi` |
| `persistence.storageClass` | Type of persistent volume claim | `generic` |
| `persistence.accessMode` | ReadWriteOnce or ReadOnly | `ReadWriteOnce` |
| `persistence.subPath` | Mount a sub directory of the persistent volume if set | `""` |
| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `100m` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `defaultBucket.enabled` | If true, a bucket will be created after minio
@@ -60,6 +60,9 @@ spec:
volumeMounts:
- name: export
mountPath: {{ .Values.mountPath }}
{{- if and .Values.persistence.enabled .Values.persistence.subPath }}
subPath: "{{ .Values.persistence.subPath }}"
{{- end }}
- name: minio-server-config
mountPath: {{ default "/root/.minio/" .Values.configPath | quote }}
- name: podinfo
@@ -77,6 +77,9 @@ spec:
volumeMounts:
- name: export
mountPath: {{ .Values.mountPath }}
{{- if and .Values.persistence.enabled .Values.persistence.subPath }}
subPath: "{{ .Values.persistence.subPath }}"
{{- end }}
- name: minio-server-config
mountPath: {{ default "/root/.minio/" .Values.configPath | quote }}
- name: podinfo
+5
View File
@@ -39,6 +39,11 @@ persistence:
accessMode: ReadWriteOnce
size: 10Gi
## If subPath is set mount a sub folder of a volume instead of the root of the volume.
## This is especially handy for volume plugins that don't natively support sub mounting (like glusterfs).
##
subPath: ""
## Expose the Minio service to be accessed from outside the cluster (LoadBalancer service).
## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it.
## ref: http://kubernetes.io/docs/user-guide/services/