77 lines
2.3 KiB
YAML
77 lines
2.3 KiB
YAML
{{- if and .Values.persistence.config.enabled (not .Values.persistence.config.existingClaim) }}
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: {{ include "audiobookshelf.fullname" . }}-config
|
|
labels:
|
|
{{- include "audiobookshelf.labels" . | nindent 4 }}
|
|
{{- with .Values.persistence.config.annotations }}
|
|
annotations:
|
|
{{ toYaml . | indent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
accessModes:
|
|
- {{ .Values.persistence.config.accessMode | quote }}
|
|
resources:
|
|
requests:
|
|
storage: {{ .Values.persistence.config.size }}
|
|
{{- if .Values.persistence.config.storageClass }}
|
|
{{- if (eq "-" .Values.persistence.config.storageClass) }}
|
|
storageClassName: ""
|
|
{{- else }}
|
|
storageClassName: "{{ .Values.persistence.config.storageClass }}"
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
---
|
|
{{- if and .Values.persistence.metadata.enabled (not .Values.persistence.metadata.existingClaim) }}
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: {{ include "audiobookshelf.fullname" . }}-metadata
|
|
labels:
|
|
{{- include "audiobookshelf.labels" . | nindent 4 }}
|
|
{{- with .Values.persistence.metadata.annotations }}
|
|
annotations:
|
|
{{ toYaml . | indent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
accessModes:
|
|
- {{ .Values.persistence.metadata.accessMode | quote }}
|
|
resources:
|
|
requests:
|
|
storage: {{ .Values.persistence.metadata.size }}
|
|
{{- if .Values.persistence.metadata.storageClass }}
|
|
{{- if (eq "-" .Values.persistence.metadata.storageClass) }}
|
|
storageClassName: ""
|
|
{{- else }}
|
|
storageClassName: "{{ .Values.persistence.metadata.storageClass }}"
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
---
|
|
{{- if and .Values.persistence.media.enabled (not .Values.persistence.media.existingClaim) }}
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: {{ include "audiobookshelf.fullname" . }}-media
|
|
labels:
|
|
{{- include "audiobookshelf.labels" . | nindent 4 }}
|
|
{{- with .Values.persistence.media.annotations }}
|
|
annotations:
|
|
{{ toYaml . | indent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
accessModes:
|
|
- {{ .Values.persistence.media.accessMode | quote }}
|
|
resources:
|
|
requests:
|
|
storage: {{ .Values.persistence.media.size }}
|
|
{{- if .Values.persistence.media.storageClass }}
|
|
{{- if (eq "-" .Values.persistence.media.storageClass) }}
|
|
storageClassName: ""
|
|
{{- else }}
|
|
storageClassName: "{{ .Values.persistence.media.storageClass }}"
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }} |