Commit bd0a06c0 authored by Waqar Ahmed's avatar Waqar Ahmed

Properly setup persistence values

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