From 5d4bdd023c4bf133e6daf83c5621ecbfcdc3ce40 Mon Sep 17 00:00:00 2001 From: Micah Wylde Date: Wed, 11 Dec 2024 17:47:32 -0800 Subject: [PATCH] Allow setting environment variables in helm chart --- k8s/arroyo/templates/configmap.yaml | 2 ++ k8s/arroyo/templates/controller.yaml | 4 ++++ k8s/arroyo/values.yaml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/k8s/arroyo/templates/configmap.yaml b/k8s/arroyo/templates/configmap.yaml index 7f7abdf73..108767903 100644 --- a/k8s/arroyo/templates/configmap.yaml +++ b/k8s/arroyo/templates/configmap.yaml @@ -65,6 +65,8 @@ data: {{- end }} resources: {{ .Values.worker.resources | toYaml | nindent 10 }} service-account-name: {{ .Values.serviceAccount.name | quote }} + env: + {{- toYaml .Values.env | nindent 10 }} volumes: {{- if .Values.volumes }} {{ .Values.volumes | toYaml | nindent 10 }} diff --git a/k8s/arroyo/templates/controller.yaml b/k8s/arroyo/templates/controller.yaml index 8b136872e..c906b1017 100644 --- a/k8s/arroyo/templates/controller.yaml +++ b/k8s/arroyo/templates/controller.yaml @@ -65,6 +65,8 @@ spec: name: {{ include "arroyo.fullname" . }}-postgresql key: password {{- end }} + + {{- include "tplvalues.render" (dict "value" .Values.env "context" $) | nindent 10 }} containers: - name: arroyo-controller securityContext: @@ -97,6 +99,8 @@ spec: fieldRef: fieldPath: metadata.uid + {{- include "tplvalues.render" (dict "value" .Values.env "context" $) | nindent 8 }} + ports: - containerPort: {{ .Values.controller.service.grpcPort }} name: grpc diff --git a/k8s/arroyo/values.yaml b/k8s/arroyo/values.yaml index c6cf3431f..7e08c794f 100644 --- a/k8s/arroyo/values.yaml +++ b/k8s/arroyo/values.yaml @@ -110,3 +110,5 @@ volumes: [] volumeMounts: [] existingConfigMap: "" + +env: [] \ No newline at end of file