kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: {{ .Values.efsProvisioner.storageClass.name }}
  labels:
    app: {{ template "efs-provisioner.name" . }}
    env: {{ .Values.global.deployEnv }}
    chart: {{ template "efs-provisioner.chartname" . }}
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
{{- if .Values.efsProvisioner.storageClass.isDefault }}
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
{{- end }}
provisioner: {{ .Values.efsProvisioner.provisionerName }}
parameters:
{{- if .Values.efsProvisioner.storageClass.gidAllocate.enabled }}
{{- with .Values.efsProvisioner.storageClass.gidAllocate }}
  gidAllocate: "true"
  gidMin: "{{ .gidMin }}"
  gidMax: "{{ .gidMax }}"
{{- end }}
{{- else }}
  gidAllocate: "false"
{{- end }}
reclaimPolicy: {{ .Values.efsProvisioner.storageClass.reclaimPolicy }}
