mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Add mount options to nfs-client-provisioner (#8327)
* Add PersistentVolume and PersistentVolumeClaim to nfs-client-provisioner chart Signed-off-by: Oleg Selin <oleg.selin@gmail.com> * Add starting space in comment Signed-off-by: Oleg Selin <oleg.selin@gmail.com> * Hide pv/pvc, move persistentVolume.mountOptions to nfs.mountOptions Signed-off-by: Oleg Selin <oleg.selin@gmail.com>
This commit is contained in:
@@ -3,7 +3,7 @@ appVersion: 3.1.0
|
||||
description: nfs-client is an automatic provisioner that used your *already configured* NFS server, automatically creating Persistent Volumes.
|
||||
name: nfs-client-provisioner
|
||||
home: https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client
|
||||
version: 1.1.2
|
||||
version: 1.2.0
|
||||
sources:
|
||||
- https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client
|
||||
maintainers:
|
||||
|
||||
@@ -58,6 +58,7 @@ The following tables lists the configurable parameters of this chart and their d
|
||||
| `storageClass.archiveOnDelete` | Archive pvc when deleting | `true` |
|
||||
| `nfs.server` | Hostname of the NFS server | null (ip or hostname) |
|
||||
| `nfs.path` | Basepath of the mount point to be used | `/ifs/kubernetes` |
|
||||
| `nfs.mountOptions` | Mount options (e.g. 'nfsvers=3') | null |
|
||||
| `resources` | Resources required (e.g. CPU, memory) | `{}` |
|
||||
| `rbac.create` | Use Role-based Access Control | `true` |
|
||||
| `podSecurityPolicy.enabled` | Create & use Pod Security Policy resources | `false` |
|
||||
|
||||
@@ -37,11 +37,13 @@ spec:
|
||||
- name: NFS_PATH
|
||||
value: {{ .Values.nfs.path }}
|
||||
volumes:
|
||||
- name: nfs-client-root
|
||||
{{- if .Values.buildMode }}
|
||||
- name: nfs-client-root
|
||||
emptyDir: {}
|
||||
{{- else if .Values.nfs.mountOptions }}
|
||||
persistentVolumeClaim:
|
||||
claimName: pvc-{{ template "nfs-client-provisioner.fullname" . }}
|
||||
{{- else }}
|
||||
- name: nfs-client-root
|
||||
nfs:
|
||||
server: {{ .Values.nfs.server }}
|
||||
path: {{ .Values.nfs.path }}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{{ if .Values.nfs.mountOptions -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: pv-{{ template "nfs-client-provisioner.fullname" . }}
|
||||
labels:
|
||||
nfs-client-provisioner: {{ template "nfs-client-provisioner.fullname" . }}
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Mi
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: {{ .Values.storageClass.reclaimPolicy }}
|
||||
storageClassName: ""
|
||||
{{- if .Values.nfs.mountOptions }}
|
||||
mountOptions:
|
||||
{{- range .Values.nfs.mountOptions }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
nfs:
|
||||
server: {{ .Values.nfs.server }}
|
||||
path: {{ .Values.nfs.path }}
|
||||
{{ end -}}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{ if .Values.nfs.mountOptions -}}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: pvc-{{ template "nfs-client-provisioner.fullname" . }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
volumeMode: Filesystem
|
||||
storageClassName: ""
|
||||
selector:
|
||||
matchLabels:
|
||||
nfs-client-provisioner: {{ template "nfs-client-provisioner.fullname" . }}
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Mi
|
||||
{{ end -}}
|
||||
@@ -17,4 +17,10 @@ allowVolumeExpansion: {{ .Values.storageClass.allowVolumeExpansion }}
|
||||
reclaimPolicy: {{ .Values.storageClass.reclaimPolicy }}
|
||||
parameters:
|
||||
archiveOnDelete: "{{ .Values.storageClass.archiveOnDelete }}"
|
||||
{{- if .Values.nfs.mountOptions }}
|
||||
mountOptions:
|
||||
{{- range .Values.nfs.mountOptions }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end -}}
|
||||
|
||||
@@ -13,6 +13,7 @@ image:
|
||||
nfs:
|
||||
server:
|
||||
path: /ifs/kubernetes
|
||||
mountOptions:
|
||||
|
||||
# For creating the StorageClass automatically:
|
||||
storageClass:
|
||||
|
||||
Reference in New Issue
Block a user