From 0598c792d8b064aade87b1dc688026bbcc432d88 Mon Sep 17 00:00:00 2001 From: Hayden Spitzley <105455169+hspitzley-czi@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:44:03 -0600 Subject: [PATCH] feat: allow specifying arbitrary envFrom in values.yaml (#23) --- stack/templates/_helpers.tpl | 5 ++++- stack/values.yaml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/stack/templates/_helpers.tpl b/stack/templates/_helpers.tpl index c2c186a..7bd7740 100644 --- a/stack/templates/_helpers.tpl +++ b/stack/templates/_helpers.tpl @@ -84,7 +84,7 @@ Create the name of the service account to use {{- end }} {{- define "service.configuration" -}} -{{- if or (or (or (ne (trim .Values.appSecrets.envSecret.secretName) "") (ne (trim .Values.appSecrets.envSecret.secretName) "")) (ne (trim .Values.appContext.envContextConfigMapName) "")) (ne (trim .Values.appContext.stackContextConfigMapName) "") -}} +{{- if or (or (or (or (ne (trim .Values.appSecrets.envSecret.secretName) "") (ne (trim .Values.appSecrets.envSecret.secretName) "")) (ne (trim .Values.appContext.envContextConfigMapName) "")) (ne (trim .Values.appContext.stackContextConfigMapName) "")) .Values.envFrom -}} envFrom: {{- if ne (trim .Values.appSecrets.envSecret.secretName) "" }} - secretRef: @@ -106,6 +106,9 @@ envFrom: name: {{ .Values.appContext.stackContextConfigMapName }} optional: true {{- end }} +{{- if .Values.envFrom }} +{{ toYaml .Values.envFrom }} +{{- end }} {{- end }} {{- end }} diff --git a/stack/values.yaml b/stack/values.yaml index 9beab32..fe4acda 100644 --- a/stack/values.yaml +++ b/stack/values.yaml @@ -153,6 +153,7 @@ global: topologySpreadConstraints: [] env: [] + envFrom: [] # Service overrides services: {}