{{- if index .Values "lvm-localpv" "enabled" }}
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-lvm
  {{- if index .Values "lvm-localpv" "storageClass" "default" }}
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
  {{- end }}
volumeBindingMode: WaitForFirstConsumer  
reclaimPolicy: Delete
parameters:
  storage: lvm
  vgpattern: {{ default "openebs.*" ( index .Values "lvm-localpv" "storageClass" "vgpattern") }}
  fsType: xfs
provisioner: local.csi.openebs.io
{{- end }}