{{- if .Values.storageClass.create -}} kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: {{ .Values.storageClass.name }} labels: app: {{ include "nfs-provisioner.name" . }} chart: {{ include "nfs-provisioner.chart" . }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} {{- if .Values.storageClass.defaultClass }} annotations: storageclass.kubernetes.io/is-default-class: "true" {{- end }} provisioner: {{ include "nfs-provisioner.provisionerName" . }} reclaimPolicy: {{ .Values.storageClass.reclaimPolicy }} {{- if .Values.storageClass.allowVolumeExpansion }} allowVolumeExpansion: {{ .Values.storageClass.allowVolumeExpansion }} {{- end }} {{- with .Values.storageClass.parameters }} parameters: {{- toYaml . | nindent 2 }} {{- end }} {{- with .Values.storageClass.mountOptions }} mountOptions: {{- toYaml . | nindent 2 }} {{- end }} {{- end }}