{{- if .Values.homeVolume.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ include "jupyterlab.homePvcName" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "jupyterlab.labels" . | nindent 4 }}
  annotations:
    # Uncomment below to retain the PVC even after helm uninstall.
    # helm.sh/resource-policy: keep
spec:
  accessModes:
    - {{ .Values.homeVolume.accessMode }}
  {{- if .Values.homeVolume.storageClassName }}
  storageClassName: {{ .Values.homeVolume.storageClassName }}
  {{- end }}
  resources:
    requests:
      storage: {{ .Values.homeVolume.size }}
---
{{- end }}
{{- if .Values.dataVolume.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ include "jupyterlab.dataPvcName" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "jupyterlab.labels" . | nindent 4 }}
  annotations:
    # Uncomment below to retain the PVC even after helm uninstall.
    # helm.sh/resource-policy: keep
spec:
  accessModes:
    - {{ .Values.dataVolume.accessMode }}
  {{- if .Values.dataVolume.storageClassName }}
  storageClassName: {{ .Values.dataVolume.storageClassName }}
  {{- end }}
  resources:
    requests:
      storage: {{ .Values.dataVolume.size }}
{{- end }}
