From f9400be153d9840864f17ed88ff6b767ac8bef94 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Fri, 7 May 2021 06:29:06 +0500 Subject: [PATCH] Allow specifying extra volumes for plex --- test/plex/1.4.0/questions.yaml | 25 +++++++++++++++++++++++ test/plex/1.4.0/templates/deployment.yaml | 9 ++++++++ 2 files changed, 34 insertions(+) diff --git a/test/plex/1.4.0/questions.yaml b/test/plex/1.4.0/questions.yaml index b29a5392c9..e69865b8ae 100644 --- a/test/plex/1.4.0/questions.yaml +++ b/test/plex/1.4.0/questions.yaml @@ -264,3 +264,28 @@ questions: type: path editable: false default: "/config/Library/Application Support/Plex Media Server/Logs" + + - variable: extraAppVolumeMounts + label: "Plex Extra Host Path Volumes" + group: "Storage" + schema: + type: list + items: + - variable: extraAppVolume + label: "Plex Host Path Volume" + description: "Add an extra host path volume for plex application" + schema: + type: dict + attrs: + - variable: mountPath + label: "Mount Path in Pod" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + required: true + - variable: hostPath + label: "Host Path" + description: "Host path" + schema: + type: hostpath + required: true diff --git a/test/plex/1.4.0/templates/deployment.yaml b/test/plex/1.4.0/templates/deployment.yaml index 778a1db7ed..a0b0b465ee 100644 --- a/test/plex/1.4.0/templates/deployment.yaml +++ b/test/plex/1.4.0/templates/deployment.yaml @@ -15,6 +15,10 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} mountPath: /bin/plex_probe_check.sh readOnly: true subPath: entrypoint.sh + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + mountPath: {{ $hostPathConfiguration.mountPath }} + {{ end }} ports: - name: pms protocol: TCP @@ -82,3 +86,8 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} configMap: defaultMode: 0700 name: "plex-probe-check" + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + hostPath: + path: {{ $hostPathConfiguration.hostPath }} + {{ end }}