{{- if .Values.persistence.enabled -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: {{ template "osclass.fullname" . }}-osclass
  labels:
    app: {{ template "osclass.fullname" . }}
    chart: {{ template "osclass.chart" . }}
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
spec:
  accessModes:
    - {{ .Values.persistence.osclass.accessMode | quote }}
  resources:
    requests:
      storage: {{ .Values.persistence.osclass.size | quote }}
  {{ include "osclass.storageClass" . }}
{{- end -}}
