Commit bd0a06c0 authored by Waqar Ahmed's avatar Waqar Ahmed

Properly setup persistence values

parent 725ee078
...@@ -144,127 +144,119 @@ questions: ...@@ -144,127 +144,119 @@ questions:
max: 65535 max: 65535
default: 32400 default: 32400
# Persistence - variable: transcodeHostPathEnabled
- variable: persistence label: "Configure Host Path for Transcode"
label: "Configure Persistent Storage" group: "Storage"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: transcodeHostpath
label: "Specify HostPath for Transcode"
group: "Storage"
schema:
type: hostpath
required: true
- variable: transcodeVolume
label: "Configure iXVolume"
group: "Storage"
schema:
type: dict
show_if: [["transcodeHostPathEnabled", "=", false]]
$ref:
- "normalize/ixVolume"
attrs:
- variable: mountPath
label: "Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
editable: false
default: "/transcode"
- variable: datasetName
label: "Dataset Name"
schema:
type: string
default: "ix-plex_transcode"
editable: false
- variable: dataHostPathEnabled
label: "Configure Host Path for Data"
group: "Storage"
schema:
type: boolean
default: false
show_subquestions_if: true
group: "Storage"
subquestions:
- variable: dataHostPath
label: "Specify HostPath for Data"
schema:
type: hostpath
required: true
- variable: dataVolume
label: "Configure data iXVolume"
group: "Storage" group: "Storage"
schema: schema:
type: dict type: dict
show_if: [["dataHostPathEnabled", "=", false]]
$ref:
- "normalize/ixVolume"
attrs: attrs:
- variable: transcode - variable: mountPath
label: "Configure Transcode Storage" label: "Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
editable: false
default: "/data"
- variable: datasetName
label: "Dataset Name"
schema:
type: string
default: "ix-plex_data"
editable: false
- variable: configHostPathEnabled
label: "Configure Host Path for Config"
group: "Storage"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: configHostPath
label: "Specify HostPath for Config"
group: "Storage"
schema: schema:
type: dict type: hostpath
attrs: required: true
- variable: hostPathEnabled
label: "Configure Host Path for Transcode" - variable: configVolume
schema: label: "Configure iXVolume"
type: boolean group: "Storage"
default: false schema:
show_subquestions_if: true type: dict
subquestions: show_if: [["configHostPathEnabled", "=", false]]
- variable: hostPath $ref:
label: "Specify HostPath for Transcode" - "normalize/ixVolume"
schema: attrs:
type: hostpath - variable: mountPath
required: true label: "Mount Path"
- variable: volume description: "Path where the volume will be mounted inside the pod"
label: "Configure iXVolume"
schema:
type: dict
show_if: [["hostPathEnabled", "=", false]]
$ref:
- "normalize/ixVolume"
attrs:
- variable: mountPath
label: "Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
editable: false
default: "/transcode"
- variable: datasetName
label: "Dataset Name"
schema:
type: string
default: "ix-plex_transcode"
editable: false
- variable: data
label: "Configure Data Storage"
schema: schema:
type: dict type: path
attrs: editable: false
- variable: hostPathEnabled default: "/config"
label: "Configure Host Path for Data" - variable: datasetName
schema: label: "Dataset Name"
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: hostPath
label: "Specify HostPath for Data"
schema:
type: hostpath
required: true
- variable: volume
label: "Configure iXVolume"
schema:
type: dict
show_if: [["hostPathEnabled", "=", false]]
$ref:
- "normalize/ixVolume"
attrs:
- variable: mountPath
label: "Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
editable: false
default: "/data"
- variable: datasetName
label: "Dataset Name"
schema:
type: string
default: "ix-plex_data"
editable: false
- variable: config
label: "Configure Config Storage"
schema: schema:
type: dict type: string
attrs: default: "ix-plex_config"
- variable: hostPathEnabled editable: false
label: "Configure Host Path for Config"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: hostPath
label: "Specify HostPath for Config"
schema:
type: hostpath
required: true
- variable: volume
label: "Configure iXVolume"
schema:
type: dict
show_if: [["hostPathEnabled", "=", false]]
$ref:
- "normalize/ixVolume"
attrs:
- variable: mountPath
label: "Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
editable: false
default: "/config"
- variable: datasetName
label: "Dataset Name"
schema:
type: string
default: "ix-plex_config"
editable: false
# Specify GPU configuration # Specify GPU configuration
- variable: gpuConfiguration - variable: gpuConfiguration
......
...@@ -15,10 +15,10 @@ Retrieve host path for transcode ...@@ -15,10 +15,10 @@ Retrieve host path for transcode
Let's please remove the redundancy Let's please remove the redundancy
*/}} */}}
{{- define "configuredHostPathTranscode" -}} {{- define "configuredHostPathTranscode" -}}
{{- if .Values.persistence.transcode.hostPathEnabled -}} {{- if .Values.transcodeHostPathEnabled -}}
{{- .Values.persistence.transcode.hostPath -}} {{- .Values.transcodeHostPath -}}
{{- else -}} {{- else -}}
{{- $volDict := dict "datasetName" $.Values.persistence.transcode.volume.datasetName "ixVolumes" $.Values.ixVolumes -}} {{- $volDict := dict "datasetName" $.Values.transcodeVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
{{- include "retrieveHostPathFromiXVolume" $volDict -}} {{- include "retrieveHostPathFromiXVolume" $volDict -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
...@@ -28,10 +28,10 @@ Retrieve host path for data ...@@ -28,10 +28,10 @@ Retrieve host path for data
Let's please remove the redundancy Let's please remove the redundancy
*/}} */}}
{{- define "configuredHostPathData" -}} {{- define "configuredHostPathData" -}}
{{- if .Values.persistence.data.hostPathEnabled -}} {{- if .Values.dataHostPathEnabled -}}
{{- .Values.persistence.data.hostPath -}} {{- .Values.dataHostPath -}}
{{- else -}} {{- else -}}
{{- $volDict := dict "datasetName" $.Values.persistence.data.volume.datasetName "ixVolumes" $.Values.ixVolumes -}} {{- $volDict := dict "datasetName" $.Values.dataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
{{- include "retrieveHostPathFromiXVolume" $volDict -}} {{- include "retrieveHostPathFromiXVolume" $volDict -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
...@@ -41,10 +41,10 @@ Retrieve host path for transcode ...@@ -41,10 +41,10 @@ Retrieve host path for transcode
Let's please remove the redundancy Let's please remove the redundancy
*/}} */}}
{{- define "configuredHostPathConfig" -}} {{- define "configuredHostPathConfig" -}}
{{- if .Values.persistence.config.hostPathEnabled -}} {{- if .Values.configHostPathEnabled -}}
{{- .Values.persistence.config.hostPath -}} {{- .Values.configHostPath -}}
{{- else -}} {{- else -}}
{{- $volDict := dict "datasetName" $.Values.persistence.config.volume.datasetName "ixVolumes" $.Values.ixVolumes -}} {{- $volDict := dict "datasetName" $.Values.configVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
{{- include "retrieveHostPathFromiXVolume" $volDict -}} {{- include "retrieveHostPathFromiXVolume" $volDict -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
...@@ -143,14 +143,26 @@ spec: ...@@ -143,14 +143,26 @@ spec:
{{- end }} {{- end }}
volumes: volumes:
- name: data - name: data
{{- if .Values.emptyDirVolumes }}
emptyDir: {}
{{- else }}
hostPath: hostPath:
path: {{ template "configuredHostPathData" . }} path: {{ template "configuredHostPathData" . }}
{{- end }}
- name: config - name: config
{{- if .Values.emptyDirVolumes }}
emptyDir: {}
{{- else }}
hostPath: hostPath:
path: {{ template "configuredHostPathConfig" . }} path: {{ template "configuredHostPathConfig" . }}
{{- end }}
- name: transcode - name: transcode
{{- if .Values.emptyDirVolumes }}
emptyDir: {}
{{- else }}
hostPath: hostPath:
path: {{ template "configuredHostPathTranscode" . }} path: {{ template "configuredHostPathTranscode" . }}
{{- end }}
- name: shared - name: shared
emptyDir: {} emptyDir: {}
- name: shared-logs - name: shared-logs
......
...@@ -57,13 +57,9 @@ plexServiceTCP: ...@@ -57,13 +57,9 @@ plexServiceTCP:
hostNetwork: false hostNetwork: false
persistence: transcodeHostPathEnabled: false
transcode: dataHostPathEnabled: false
hostPathEnabled: false configHostPathEnabled: false
data:
hostPathEnabled: false
config:
hostPathEnabled: false
proxy: proxy:
# This allows to set a proxy environment variable, which PMS uses to fetch the token and assets like movie cover # This allows to set a proxy environment variable, which PMS uses to fetch the token and assets like movie cover
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment