Commit 06a75d2c authored by Waqar Ahmed's avatar Waqar Ahmed

Add check for env variable at chart level instead of schema

This commit introduces a change by marking env variable name/value variables as not required as UI cannot properly handle this right now.
parent 51d5e889
...@@ -83,12 +83,10 @@ questions: ...@@ -83,12 +83,10 @@ questions:
label: "Name" label: "Name"
schema: schema:
type: string type: string
required: true
- variable: value - variable: value
label: "Value" label: "Value"
schema: schema:
type: string type: string
required: true
- variable: service - variable: service
description: "IPFS Service Configuration" description: "IPFS Service Configuration"
......
...@@ -106,8 +106,12 @@ spec: ...@@ -106,8 +106,12 @@ spec:
{{- if .Values.environment }} {{- if .Values.environment }}
env: env:
{{- range $envVariable := .Values.environment }} {{- range $envVariable := .Values.environment }}
{{- if and $envVariable.name $envVariable.value }}
- name: {{ $envVariable.name }} - name: {{ $envVariable.name }}
value: {{ $envVariable.value | quote }} value: {{ $envVariable.value | quote }}
{{- else }}
{{- fail "Please specify name/value for environment variable" }}
{{- end }}
{{- end}} {{- end}}
{{- end }} {{- end }}
volumes: volumes:
......
...@@ -116,12 +116,10 @@ questions: ...@@ -116,12 +116,10 @@ questions:
label: "Name" label: "Name"
schema: schema:
type: string type: string
required: true
- variable: value - variable: value
label: "Value" label: "Value"
schema: schema:
type: string type: string
required: true
- variable: service - variable: service
description: "Minio Service Configuration" description: "Minio Service Configuration"
......
...@@ -51,8 +51,12 @@ spec: ...@@ -51,8 +51,12 @@ spec:
name: {{ template "minio.secretName" . }} name: {{ template "minio.secretName" . }}
key: secretkey key: secretkey
{{- range $envVariable := .Values.environment }} {{- range $envVariable := .Values.environment }}
{{- if and $envVariable.name $envVariable.value }}
- name: {{ $envVariable.name }} - name: {{ $envVariable.name }}
value: {{ $envVariable.value | quote }} value: {{ $envVariable.value | quote }}
{{- else }}
{{- fail "Please specify name/value for environment variable" }}
{{- end }}
{{- end}} {{- end}}
volumes: volumes:
- name: export - name: export
......
...@@ -98,12 +98,10 @@ questions: ...@@ -98,12 +98,10 @@ questions:
label: "Name" label: "Name"
schema: schema:
type: string type: string
required: true
- variable: value - variable: value
label: "Value" label: "Value"
schema: schema:
type: string type: string
required: true
- variable: timezone - variable: timezone
label: "Plex container timezone" label: "Plex container timezone"
......
...@@ -69,8 +69,12 @@ spec: ...@@ -69,8 +69,12 @@ spec:
fieldPath: metadata.namespace fieldPath: metadata.namespace
# Extra ENV Values supplied by user # Extra ENV Values supplied by user
{{- range $envVariable := .Values.environmentVariables }} {{- range $envVariable := .Values.environmentVariables }}
{{- if and $envVariable.name $envVariable.value }}
- name: {{ $envVariable.name }} - name: {{ $envVariable.name }}
value: {{ $envVariable.value | quote }} value: {{ $envVariable.value | quote }}
{{- else }}
{{- fail "Please specify name/value for environment variable" }}
{{- end }}
{{- end}} {{- end}}
readinessProbe: readinessProbe:
httpGet: httpGet:
......
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