diff --git a/stable/nfs-client-provisioner/Chart.yaml b/stable/nfs-client-provisioner/Chart.yaml index af163d3a29..78a4a8e911 100644 --- a/stable/nfs-client-provisioner/Chart.yaml +++ b/stable/nfs-client-provisioner/Chart.yaml @@ -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: diff --git a/stable/nfs-client-provisioner/README.md b/stable/nfs-client-provisioner/README.md index 961fda7fb9..fd2b23c989 100644 --- a/stable/nfs-client-provisioner/README.md +++ b/stable/nfs-client-provisioner/README.md @@ -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` | diff --git a/stable/nfs-client-provisioner/templates/deployment.yaml b/stable/nfs-client-provisioner/templates/deployment.yaml index c15e30722d..03735db7f6 100644 --- a/stable/nfs-client-provisioner/templates/deployment.yaml +++ b/stable/nfs-client-provisioner/templates/deployment.yaml @@ -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 }} diff --git a/stable/nfs-client-provisioner/templates/persistentvolume.yaml b/stable/nfs-client-provisioner/templates/persistentvolume.yaml new file mode 100644 index 0000000000..62cec4b70c --- /dev/null +++ b/stable/nfs-client-provisioner/templates/persistentvolume.yaml @@ -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 -}} diff --git a/stable/nfs-client-provisioner/templates/persistentvolumeclaim.yaml b/stable/nfs-client-provisioner/templates/persistentvolumeclaim.yaml new file mode 100644 index 0000000000..1afd6b3e34 --- /dev/null +++ b/stable/nfs-client-provisioner/templates/persistentvolumeclaim.yaml @@ -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 -}} diff --git a/stable/nfs-client-provisioner/templates/storageclass.yaml b/stable/nfs-client-provisioner/templates/storageclass.yaml index 686ffe98f7..81953c0dde 100644 --- a/stable/nfs-client-provisioner/templates/storageclass.yaml +++ b/stable/nfs-client-provisioner/templates/storageclass.yaml @@ -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 -}} diff --git a/stable/nfs-client-provisioner/values.yaml b/stable/nfs-client-provisioner/values.yaml index 0caaa1a0d0..dac4ea6e5d 100644 --- a/stable/nfs-client-provisioner/values.yaml +++ b/stable/nfs-client-provisioner/values.yaml @@ -13,6 +13,7 @@ image: nfs: server: path: /ifs/kubernetes + mountOptions: # For creating the StorageClass automatically: storageClass: