Commit e8355055 by Guangbo Chen Committed by Guangbo

Update nfs-provisioner to use hostpath if persistence is not set

parent 77583db8
...@@ -3,7 +3,7 @@ appVersion: 1.0.9 ...@@ -3,7 +3,7 @@ appVersion: 1.0.9
description: nfs-server-provisioner is an out-of-tree dynamic provisioner for Kubernetes. You can use it to quickly & easily deploy shared storage that works almost anywhere. description: nfs-server-provisioner is an out-of-tree dynamic provisioner for Kubernetes. You can use it to quickly & easily deploy shared storage that works almost anywhere.
name: nfs-provisioner name: nfs-provisioner
icon: file://../nfs-logo.png icon: file://../nfs-logo.png
version: 0.2.1 version: 0.2.2
maintainers: maintainers:
- name: kiall - name: kiall
email: kiall@macinnes.ie email: kiall@macinnes.ie
......
...@@ -101,3 +101,11 @@ questions: ...@@ -101,3 +101,11 @@ questions:
description: "If undefined or null, uses the default StorageClass. Default to null" description: "If undefined or null, uses the default StorageClass. Default to null"
type: storageclass type: storageclass
label: Default StorageClass for nfs-server-provisionner label: Default StorageClass for nfs-server-provisionner
- variable: persistence.hostPath
default: "/srv"
description: "for GKE uses /home/kubernetes/nfs/ instead, custom nfs host path read and write permission are required, default to /srv"
type: string
label: NFS Host Path
required: true
show_if: "persistence.enabled=false"
group: "Persistent Storage"
...@@ -85,7 +85,8 @@ spec: ...@@ -85,7 +85,8 @@ spec:
{{- if not .Values.persistence.enabled }} {{- if not .Values.persistence.enabled }}
volumes: volumes:
- name: data - name: data
emptyDir: {} hostPath:
path: {{ .Values.persistence.hostPath }}
{{- end }} {{- end }}
{{- if .Values.persistence.enabled }} {{- if .Values.persistence.enabled }}
......
...@@ -37,6 +37,7 @@ persistence: ...@@ -37,6 +37,7 @@ persistence:
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
size: 1Gi size: 1Gi
hostPath: /srv
## For creating the StorageClass automatically: ## For creating the StorageClass automatically:
storageClass: storageClass:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment