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