From c2e2dc9600d9cec19c8ac2c88b37add18f0a0d4b Mon Sep 17 00:00:00 2001 From: Dominic DePasquale <7384087+domdepasquale@users.noreply.github.com> Date: Mon, 22 Apr 2024 23:58:13 -0400 Subject: [PATCH] app: allow specifing arbitrary envs (#76) * app: allow specifing arbitrary envs * include initContainer --- charts/application-core/Chart.yaml | 2 +- charts/application-core/templates/deployment.yaml | 8 ++++++++ charts/application-core/values.yaml | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/charts/application-core/Chart.yaml b/charts/application-core/Chart.yaml index c6bc99a..388ada8 100644 --- a/charts/application-core/Chart.yaml +++ b/charts/application-core/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 3.1.0 +version: 3.2.0 maintainers: - name: Dominic DePasquale diff --git a/charts/application-core/templates/deployment.yaml b/charts/application-core/templates/deployment.yaml index ab16962..f3e1300 100644 --- a/charts/application-core/templates/deployment.yaml +++ b/charts/application-core/templates/deployment.yaml @@ -58,6 +58,10 @@ spec: - {{ . }} {{- end }} {{- end }} + {{- if or .Values.env }} + env: + {{- .Values.env | toYaml | nindent 12 }} + {{- end }} {{- if or .Values.externalSecret.enabled .Values.configMap.enabled .Values.extraConfigMaps .Values.extraSecrets }} envFrom: {{- if .Values.configMap.enabled }} @@ -109,6 +113,10 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} {{- end }} + {{- if or .Values.env }} + env: + {{- .Values.env | toYaml | nindent 12 }} + {{- end }} {{- if or .Values.externalSecret.enabled .Values.configMap.enabled .Values.extraConfigMaps .Values.extraSecrets }} envFrom: {{- if .Values.configMap.enabled }} diff --git a/charts/application-core/values.yaml b/charts/application-core/values.yaml index 8ad6523..a2838e7 100644 --- a/charts/application-core/values.yaml +++ b/charts/application-core/values.yaml @@ -86,6 +86,12 @@ configMap: enabled: false data: {} +env: [] + # - name: FOO + # value: BAR + # - name: BAZ + # value: $(FOO)-$(FOO) + # extraConfigMaps and extraSecrets to be mounted as envFrom extraConfigMaps: [] extraSecrets: []