From 2431eb24d5e53f2f586a2bffc741f5b5c10e4d86 Mon Sep 17 00:00:00 2001 From: Claude Dioudonnat Date: Wed, 20 Mar 2024 18:49:30 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(jenny)=20allow=20to=20add=20env=20fro?= =?UTF-8?q?m=20secret?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allow from the values to add environment variable from secret to configure Jenny's app. --- jenny/templates/_helpers.tpl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jenny/templates/_helpers.tpl b/jenny/templates/_helpers.tpl index 1da931c..391082d 100644 --- a/jenny/templates/_helpers.tpl +++ b/jenny/templates/_helpers.tpl @@ -77,6 +77,13 @@ service: app value: "{{ .Values.django.db.host }}" - name: "DB_PORT" value: "{{ .Values.django.db.port }}" +{{- range $key, $val := .Values.env.secret }} +- name: {{ $val.envName }} + valueFrom: + secretKeyRef: + name: {{ $val.secretName }} + key: {{ $val.keyName }} +{{- end }} {{- end }} {{- define "django.imagePullSecrets" -}}