{{- if .Values.mysql.create -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ include "jifa.mysqlName" . }}
  namespace: {{ .Release.Namespace | quote }}
  labels:
    {{- include "jifa.labels" . | nindent 4 }}
spec:
  storageClassName: {{ .Values.storageClass }}
  accessModes:
  {{- range .Values.mysql.persistence.accessModes }}
    - {{ . | quote }}
  {{- end }}
  resources:
    requests:
      storage: {{ .Values.mysql.persistence.size | quote }}
{{- end }}