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