{{ if .Values.nfs.mountOptions -}}
apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv-{{ template "nfs-subdir-external-provisioner.fullname" . }}
  labels: 
    {{- include "nfs-subdir-external-provisioner.labels" . | nindent 4 }}
    nfs-subdir-external-provisioner: {{ template "nfs-subdir-external-provisioner.fullname" . }}
spec:
  capacity:
    storage: 10Mi
  volumeMode: Filesystem
  accessModes:
    - {{ .Values.storageClass.accessModes }}
  persistentVolumeReclaimPolicy: {{ .Values.nfs.reclaimPolicy }}
  storageClassName: ""
  {{- if .Values.nfs.mountOptions }}
  mountOptions:
    {{- range .Values.nfs.mountOptions }}
    - {{ . }}
    {{- end }}
  {{- end }}
  nfs:
    server: {{ .Values.nfs.server }}
    path: {{ .Values.nfs.path }}
{{ end -}}
