k8s-charts/charts/jellyfin/templates/pvc-media.yaml

33 lines
1.1 KiB
YAML

{{- if .Values.persistence.media.enabled -}}
{{- if not .Values.persistence.media.existingClaim -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "jellyfin.fullname" . }}-pvc
labels:
{{- include "jellyfin.labels" . | nindent 4 }}
# app.kubernetes.io/name: {{ include "jellyfin.name" . }}
# helm.sh/chart: {{ include "jellyfin.chart" . }}
# app.kubernetes.io/instance: {{ .Release.Name }}
# app.kubernetes.io/managed-by: {{ .Release.Service }}
# app.kubernetes.io/component: app
{{- if .Values.persistence.media.annotations }}
annotations:
{{ toYaml .Values.persistence.media.annotations | indent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.media.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.media.size | quote }}
{{- if .Values.persistence.media.storageClass }}
{{- if (eq "-" .Values.persistence.media.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.media.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}