{{- if .Values.storage.huggingface.createPersistentVolumeClaim }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ .Values.storage.huggingface.claimName }}
  namespace: {{ include "nebulous.namespace" . }}
  labels:
    {{- include "common.labels" . | nindent 4 }}
spec:
  {{- with .Values.storage.huggingface.storageClassName }}
  storageClassName: {{.}}
  {{- end }}
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: {{ .Values.storage.huggingface.size }}
---
{{- end }}
{{- if .Values.storage.adapter.createPersistentVolumeClaim }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ .Values.storage.adapter.claimName }}
  namespace: {{ include "nebulous.namespace" . }}
  labels:
    {{- include "common.labels" . | nindent 4 }}
spec:
  {{- with .Values.storage.adapter.storageClassName }}
  storageClassName: {{.}}
  {{- end }}
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: {{ .Values.storage.adapter.size }}
---
{{- end }}
{{- if .Values.storage.dataset.createPersistentVolumeClaim }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ .Values.storage.dataset.claimName }}
  namespace: {{ include "nebulous.namespace" . }}
  labels:
    {{- include "common.labels" . | nindent 4 }}
spec:
  {{- with .Values.storage.dataset.storageClassName }}
  storageClassName: {{.}}
  {{- end }}
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: {{ .Values.storage.dataset.size }}
---
{{- end }}
{{- if .Values.storage.model.createPersistentVolumeClaim }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ .Values.storage.model.claimName }}
  namespace: {{ include "nebulous.namespace" . }}
  labels:
    {{- include "common.labels" . | nindent 4 }}
spec:
  {{- with .Values.storage.model.storageClassName }}
  storageClassName: {{.}}
  {{- end }}
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: {{ .Values.storage.model.size }}
{{- end }}
