diff --git a/test/plex/2.1.0/questions.yaml b/test/plex/2.1.0/questions.yaml index a21fd9adc96..52e778e8522 100644 --- a/test/plex/2.1.0/questions.yaml +++ b/test/plex/2.1.0/questions.yaml @@ -144,127 +144,119 @@ questions: max: 65535 default: 32400 - # Persistence - - variable: persistence - label: "Configure Persistent Storage" + - variable: transcodeHostPathEnabled + label: "Configure Host Path for Transcode" + 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: transcode - label: "Configure Transcode Storage" + - variable: mountPath + label: "Mount Path" + description: "Path where the volume will be mounted inside the pod" schema: - type: dict - attrs: - - variable: hostPathEnabled - label: "Configure Host Path for Transcode" - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hostPath - label: "Specify HostPath for Transcode" - 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: "/transcode" - - variable: datasetName - label: "Dataset Name" - schema: - type: string - default: "ix-plex_transcode" - editable: false - - variable: data - label: "Configure Data Storage" + type: path + editable: false + default: "/transcode" + - variable: datasetName + label: "Dataset Name" schema: - type: dict - attrs: - - variable: hostPathEnabled - label: "Configure Host Path for Data" - schema: - 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" + 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: dict - attrs: - - variable: hostPathEnabled - 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 + type: hostpath + required: true + + - variable: dataVolume + label: "Configure data iXVolume" + group: "Storage" + schema: + type: dict + show_if: [["dataHostPathEnabled", "=", 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: 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: + type: hostpath + required: true + + - variable: configVolume + label: "Configure iXVolume" + group: "Storage" + schema: + type: dict + show_if: [["configHostPathEnabled", "=", 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 - variable: gpuConfiguration diff --git a/test/plex/2.1.0/templates/_storage.tpl b/test/plex/2.1.0/templates/_storage.tpl index 31cbc6eb571..ef34fcb041e 100644 --- a/test/plex/2.1.0/templates/_storage.tpl +++ b/test/plex/2.1.0/templates/_storage.tpl @@ -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 -}} diff --git a/test/plex/2.1.0/templates/deployment.yaml b/test/plex/2.1.0/templates/deployment.yaml index acbc425aced..714fcfae761 100644 --- a/test/plex/2.1.0/templates/deployment.yaml +++ b/test/plex/2.1.0/templates/deployment.yaml @@ -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 diff --git a/test/plex/2.1.0/values.yaml b/test/plex/2.1.0/values.yaml index 668423ea8ea..53379d62a92 100644 --- a/test/plex/2.1.0/values.yaml +++ b/test/plex/2.1.0/values.yaml @@ -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