From fe2ebf7b7f1c00041d0a4f762d982cbadaf88db1 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Wed, 20 Jan 2021 18:22:02 +0500 Subject: [PATCH] Allow specifying extra environment variables for plex --- test/plex/1.0.1/questions.yaml | 31 +++++++++++++++++------ test/plex/1.0.1/templates/deployment.yaml | 8 +++--- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/test/plex/1.0.1/questions.yaml b/test/plex/1.0.1/questions.yaml index a6c26cc3b9..df1880be03 100644 --- a/test/plex/1.0.1/questions.yaml +++ b/test/plex/1.0.1/questions.yaml @@ -74,14 +74,6 @@ questions: type: string default: "" - - variable: extraEnv - label: "Environment variables for plex" - group: "Plex Configuration" - schema: - type: dict - additional_attrs: true - attrs: [] - - variable: hostNetwork label: "Configure Host Network" group: "Networking" @@ -89,6 +81,29 @@ questions: type: boolean default: false + - variable: environmentVariables + label: "Environment Variables for Plex" + group: "Plex Configuration" + schema: + type: list + default: [] + items: + - variable: environmentVariable + label: "Environment Variable" + schema: + type: dict + attrs: + - variable: name + label: "Name" + schema: + type: string + required: true + - variable: value + label: "Value" + schema: + type: string + required: true + - variable: timezone label: "Plex container timezone" group: "Plex Configuration" diff --git a/test/plex/1.0.1/templates/deployment.yaml b/test/plex/1.0.1/templates/deployment.yaml index 964d19d71f..2457b9bb1e 100644 --- a/test/plex/1.0.1/templates/deployment.yaml +++ b/test/plex/1.0.1/templates/deployment.yaml @@ -68,10 +68,10 @@ spec: fieldRef: fieldPath: metadata.namespace # Extra ENV Values supplied by user -{{- range $key, $value := .Values.extraEnv }} - - name: {{ $key }} - value: {{ $value }} -{{- end }} +{{- range $envVariable := .Values.environmentVariables }} + - name: {{ $envVariable.name }} + value: {{ $envVariable.value | quote }} +{{- end}} readinessProbe: httpGet: path: /identity