From f71e22acec3a53eec9de646e8efa05deb7bef2a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cmrgionsi=E2=80=9D?= Date: Thu, 18 Apr 2024 15:24:49 +0200 Subject: [PATCH] Fix storage class name variable --- servarr/templates/pvc.yaml | 118 ++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/servarr/templates/pvc.yaml b/servarr/templates/pvc.yaml index 8920458..cb1ecbb 100644 --- a/servarr/templates/pvc.yaml +++ b/servarr/templates/pvc.yaml @@ -1,60 +1,60 @@ -{{- $is_downloads_pvc_present := (lookup "v1" "PersistentVolumeClaim" .Release.Namespace .Values.volumes.downloads.name) }} -{{- if not $is_downloads_pvc_present }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ .Values.volumes.downloads.name }} - annotations: - helm.sh/hook: pre-install,pre-upgrade - helm.sh/hook-weight: "-5" - helm.sh/hook-delete-policy: hook-failed -spec: - storageClassName: {{ .Values.volumes.storageClasss }} - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.volumes.downloads.size }} -{{- end }} - ---- - -{{- $is_media_pvc_present := (lookup "v1" "PersistentVolumeClaim" .Release.Namespace .Values.volumes.media.name) }} -{{- if not $is_media_pvc_present }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ .Values.volumes.media.name }} - annotations: - helm.sh/hook: pre-install,pre-upgrade - helm.sh/hook-weight: "-5" - helm.sh/hook-delete-policy: hook-failed -spec: - storageClassName: {{ .Values.volumes.storageClasss }} - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.volumes.media.size }} -{{- end }} - ---- - -{{- $is_torrentconfig_pvc_present := (lookup "v1" "PersistentVolumeClaim" .Release.Namespace .Values.volumes.torrentConfig.name) }} -{{- if not $is_torrentconfig_pvc_present }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ .Values.volumes.torrentConfig.name }} - annotations: - helm.sh/hook: pre-install,pre-upgrade - helm.sh/hook-weight: "-5" - helm.sh/hook-delete-policy: hook-failed -spec: - storageClassName: {{ .Values.volumes.storageClasss }} - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.volumes.torrentConfig.size }} +{{- $is_downloads_pvc_present := (lookup "v1" "PersistentVolumeClaim" .Release.Namespace .Values.volumes.downloads.name) }} +{{- if not $is_downloads_pvc_present }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Values.volumes.downloads.name }} + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-5" + helm.sh/hook-delete-policy: hook-failed +spec: + storageClassName: {{ .Values.volumes.storageClass }} + accessModes: + - ReadWriteMany + resources: + requests: + storage: {{ .Values.volumes.downloads.size }} +{{- end }} + +--- + +{{- $is_media_pvc_present := (lookup "v1" "PersistentVolumeClaim" .Release.Namespace .Values.volumes.media.name) }} +{{- if not $is_media_pvc_present }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Values.volumes.media.name }} + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-5" + helm.sh/hook-delete-policy: hook-failed +spec: + storageClassName: {{ .Values.volumes.storageClass }} + accessModes: + - ReadWriteMany + resources: + requests: + storage: {{ .Values.volumes.media.size }} +{{- end }} + +--- + +{{- $is_torrentconfig_pvc_present := (lookup "v1" "PersistentVolumeClaim" .Release.Namespace .Values.volumes.torrentConfig.name) }} +{{- if not $is_torrentconfig_pvc_present }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Values.volumes.torrentConfig.name }} + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-5" + helm.sh/hook-delete-policy: hook-failed +spec: + storageClassName: {{ .Values.volumes.storageClass }} + accessModes: + - ReadWriteMany + resources: + requests: + storage: {{ .Values.volumes.torrentConfig.size }} {{- end }} \ No newline at end of file