{{- if .Values.persistence.enabled }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: {{ include "omada-controller.fullname" . }}-work
  annotations:
  {{- if .Values.persistence.storageClass }}
    storageClassName: {{ .Values.persistence.storageClass | quote }}
  {{- else }}
    storageClassName: default
  {{- end }}
spec:
  accessModes:
    - {{ .Values.persistence.accessMode | quote }}
  resources:
    requests:
      storage: {{ .Values.persistence.size | quote }}
{{- end }}
---
{{- if .Values.persistence.enabled }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: {{ include "omada-controller.fullname" . }}-logs
  annotations:
  {{- if .Values.persistence.storageClass }}
    storageClassName: {{ .Values.persistence.storageClass | quote }}
  {{- else }}
    storageClassName: default
  {{- end }}
spec:
  accessModes:
    - {{ .Values.persistence.accessMode | quote }}
  resources:
    requests:
      storage: {{ .Values.persistence.size | quote }}
{{- end }}
---
{{- if .Values.persistence.enabled }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: {{ include "omada-controller.fullname" . }}-data
  annotations:
  {{- if .Values.persistence.storageClass }}
    storageClassName: {{ .Values.persistence.storageClass | quote }}
  {{- else }}
    storageClassName: default
  {{- end }}
spec:
  accessModes:
    - {{ .Values.persistence.accessMode | quote }}
  resources:
    requests:
      storage: {{ .Values.persistence.size | quote }}
{{- end }}
