From 06ae599e794dcc1ea7f54ef33a5efea30b771b37 Mon Sep 17 00:00:00 2001 From: Feleuxens Date: Sat, 9 Dec 2023 12:41:29 +0100 Subject: [PATCH] Add initcoontainer to create subfolders for various media types --- jellyfin/Chart.yaml | 2 +- jellyfin/templates/deployment.yaml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/jellyfin/Chart.yaml b/jellyfin/Chart.yaml index de73b35..4ab4320 100644 --- a/jellyfin/Chart.yaml +++ b/jellyfin/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/jellyfin/templates/deployment.yaml b/jellyfin/templates/deployment.yaml index af45bfd..8721572 100644 --- a/jellyfin/templates/deployment.yaml +++ b/jellyfin/templates/deployment.yaml @@ -64,6 +64,25 @@ spec: {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} + # create folders in media pv for the different media types + {{- if .Values.persistence.media.enabled }} + initContainers: + - name: media-fodlers-creation + image: busybox:1.35 + command: + - /bin/mkdir + args: + - -p + - /media/movies + - /media/music + - /media/shows + - /media/books + - /media/music-videos + - /media/movies-and-shows + volumesMounts: + - mountPath: /media + name: media + {{- end }} volumes: {{- if .Values.persistence.config.enabled }} - name: config