Properly setup persistence values

This commit is contained in:
Waqar Ahmed 2020-12-08 03:33:53 +05:00
parent 725ee078dd
commit bd0a06c017
4 changed files with 130 additions and 130 deletions

View File

@ -144,35 +144,27 @@ questions:
max: 65535
default: 32400
# Persistence
- variable: persistence
label: "Configure Persistent Storage"
group: "Storage"
schema:
type: dict
attrs:
- variable: transcode
label: "Configure Transcode Storage"
schema:
type: dict
attrs:
- variable: hostPathEnabled
- variable: transcodeHostPathEnabled
label: "Configure Host Path for Transcode"
group: "Storage"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: hostPath
- variable: transcodeHostpath
label: "Specify HostPath for Transcode"
group: "Storage"
schema:
type: hostpath
required: true
- variable: volume
- variable: transcodeVolume
label: "Configure iXVolume"
group: "Storage"
schema:
type: dict
show_if: [["hostPathEnabled", "=", false]]
show_if: [["transcodeHostPathEnabled", "=", false]]
$ref:
- "normalize/ixVolume"
attrs:
@ -189,28 +181,28 @@ questions:
type: string
default: "ix-plex_transcode"
editable: false
- variable: data
label: "Configure Data Storage"
schema:
type: dict
attrs:
- variable: hostPathEnabled
- variable: dataHostPathEnabled
label: "Configure Host Path for Data"
group: "Storage"
schema:
type: boolean
default: false
show_subquestions_if: true
group: "Storage"
subquestions:
- variable: hostPath
- variable: dataHostPath
label: "Specify HostPath for Data"
schema:
type: hostpath
required: true
- variable: volume
label: "Configure iXVolume"
- variable: dataVolume
label: "Configure data iXVolume"
group: "Storage"
schema:
type: dict
show_if: [["hostPathEnabled", "=", false]]
show_if: [["dataHostPathEnabled", "=", false]]
$ref:
- "normalize/ixVolume"
attrs:
@ -227,28 +219,28 @@ questions:
type: string
default: "ix-plex_data"
editable: false
- variable: config
label: "Configure Config Storage"
schema:
type: dict
attrs:
- variable: hostPathEnabled
- variable: configHostPathEnabled
label: "Configure Host Path for Config"
group: "Storage"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: hostPath
- variable: configHostPath
label: "Specify HostPath for Config"
group: "Storage"
schema:
type: hostpath
required: true
- variable: volume
- variable: configVolume
label: "Configure iXVolume"
group: "Storage"
schema:
type: dict
show_if: [["hostPathEnabled", "=", false]]
show_if: [["configHostPathEnabled", "=", false]]
$ref:
- "normalize/ixVolume"
attrs:

View File

@ -15,10 +15,10 @@ Retrieve host path for transcode
Let's please remove the redundancy
*/}}
{{- define "configuredHostPathTranscode" -}}
{{- if .Values.persistence.transcode.hostPathEnabled -}}
{{- .Values.persistence.transcode.hostPath -}}
{{- if .Values.transcodeHostPathEnabled -}}
{{- .Values.transcodeHostPath -}}
{{- else -}}
{{- $volDict := dict "datasetName" $.Values.persistence.transcode.volume.datasetName "ixVolumes" $.Values.ixVolumes -}}
{{- $volDict := dict "datasetName" $.Values.transcodeVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
{{- end -}}
{{- end -}}
@ -28,10 +28,10 @@ Retrieve host path for data
Let's please remove the redundancy
*/}}
{{- define "configuredHostPathData" -}}
{{- if .Values.persistence.data.hostPathEnabled -}}
{{- .Values.persistence.data.hostPath -}}
{{- if .Values.dataHostPathEnabled -}}
{{- .Values.dataHostPath -}}
{{- else -}}
{{- $volDict := dict "datasetName" $.Values.persistence.data.volume.datasetName "ixVolumes" $.Values.ixVolumes -}}
{{- $volDict := dict "datasetName" $.Values.dataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
{{- end -}}
{{- end -}}
@ -41,10 +41,10 @@ Retrieve host path for transcode
Let's please remove the redundancy
*/}}
{{- define "configuredHostPathConfig" -}}
{{- if .Values.persistence.config.hostPathEnabled -}}
{{- .Values.persistence.config.hostPath -}}
{{- if .Values.configHostPathEnabled -}}
{{- .Values.configHostPath -}}
{{- else -}}
{{- $volDict := dict "datasetName" $.Values.persistence.config.volume.datasetName "ixVolumes" $.Values.ixVolumes -}}
{{- $volDict := dict "datasetName" $.Values.configVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
{{- end -}}
{{- end -}}

View File

@ -143,14 +143,26 @@ spec:
{{- end }}
volumes:
- name: data
{{- if .Values.emptyDirVolumes }}
emptyDir: {}
{{- else }}
hostPath:
path: {{ template "configuredHostPathData" . }}
{{- end }}
- name: config
{{- if .Values.emptyDirVolumes }}
emptyDir: {}
{{- else }}
hostPath:
path: {{ template "configuredHostPathConfig" . }}
{{- end }}
- name: transcode
{{- if .Values.emptyDirVolumes }}
emptyDir: {}
{{- else }}
hostPath:
path: {{ template "configuredHostPathTranscode" . }}
{{- end }}
- name: shared
emptyDir: {}
- name: shared-logs

View File

@ -57,13 +57,9 @@ plexServiceTCP:
hostNetwork: false
persistence:
transcode:
hostPathEnabled: false
data:
hostPathEnabled: false
config:
hostPathEnabled: false
transcodeHostPathEnabled: false
dataHostPathEnabled: false
configHostPathEnabled: false
proxy:
# This allows to set a proxy environment variable, which PMS uses to fetch the token and assets like movie cover