set env variables on helm-deployed apps so that they work as expected
Signed-off-by: Pascal Sthamer <pascal+github@sthamer.xyz>
This commit is contained in:
@@ -120,6 +120,16 @@ spec:
|
|||||||
args: {{- include "common.tplvalues.render" (dict "value" $appValues.args "context" $) | nindent 12 }}
|
args: {{- include "common.tplvalues.render" (dict "value" $appValues.args "context" $) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
|
- name: AUTHORIZATION
|
||||||
|
value: ""
|
||||||
|
- name: EXECUTIONID
|
||||||
|
value: ""
|
||||||
|
- name: BASE_URL
|
||||||
|
value: {{ include "shuffle.worker.baseUrl" $ | quote }}
|
||||||
|
- name: CALLBACK_URL
|
||||||
|
value: {{ include "shuffle.backend.baseUrl" $ | quote }}
|
||||||
|
- name: SHUFFLE_SWARM_CONFIG
|
||||||
|
value: run # Shuffle Worker requires this to be set even when using K8s instead of swarm
|
||||||
{{- $env := include "shuffle.appInstance.env" $ | fromYaml }}
|
{{- $env := include "shuffle.appInstance.env" $ | fromYaml }}
|
||||||
{{- range $key, $val := $env }}
|
{{- range $key, $val := $env }}
|
||||||
- name: {{ $key | quote }}
|
- name: {{ $key | quote }}
|
||||||
|
|||||||
@@ -108,6 +108,18 @@ Usage:
|
|||||||
{{ include "common.affinities.pods" (dict "type" .type "customLabels" $customLabels "context" .context )}}
|
{{ include "common.affinities.pods" (dict "type" .type "customLabels" $customLabels "context" .context )}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "shuffle.worker.hostname" -}}
|
||||||
|
{{- if .Values.worker.enableHelmDeployment -}}
|
||||||
|
http://{{ include "shuffle.worker.name" . }}.{{ .Release.Namespace }}.svc.cluster.local
|
||||||
|
{{- else -}}
|
||||||
|
http://shuffle-workers.{{ .Release.Namespace }}.svc.cluster.local
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "shuffle.worker.baseUrl" -}}
|
||||||
|
{{ include "shuffle.worker.hostname" . }}:{{ .Values.worker.containerPorts.http }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Return the environment variables of shuffle-worker in the format
|
Return the environment variables of shuffle-worker in the format
|
||||||
KEY: VALUE
|
KEY: VALUE
|
||||||
@@ -118,12 +130,7 @@ KUBERNETES_NAMESPACE: "{{ .Release.Namespace }}"
|
|||||||
SHUFFLE_SWARM_CONFIG: "run" # Shuffle Worker requires this to be set even when using K8s instead of swarm
|
SHUFFLE_SWARM_CONFIG: "run" # Shuffle Worker requires this to be set even when using K8s instead of swarm
|
||||||
BASE_URL: {{ include "shuffle.backend.baseUrl" . | quote }}
|
BASE_URL: {{ include "shuffle.backend.baseUrl" . | quote }}
|
||||||
SHUFFLE_APP_EXPOSED_PORT: {{ .Values.app.exposedContainerPort | quote }}
|
SHUFFLE_APP_EXPOSED_PORT: {{ .Values.app.exposedContainerPort | quote }}
|
||||||
|
WORKER_HOSTNAME: {{ include "shuffle.worker.hostname" . }}
|
||||||
{{- if .Values.worker.enableHelmDeployment }}
|
|
||||||
WORKER_HOSTNAME: "{{ include "shuffle.worker.name" . }}.{{ .Release.Namespace }}.svc.cluster.local"
|
|
||||||
{{- else }}
|
|
||||||
WORKER_HOSTNAME: "shuffle-workers.{{ .Release.Namespace }}.svc.cluster.local"
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if .Values.worker.manageAppDeployments }}
|
{{- if .Values.worker.manageAppDeployments }}
|
||||||
# Shuffle app images
|
# Shuffle app images
|
||||||
|
|||||||
Reference in New Issue
Block a user