From 9fa7f350e62f0852d49d3b0fb4ebf4a6cc3dbfdf Mon Sep 17 00:00:00 2001 From: Morten Matthiesen Date: Thu, 7 Nov 2024 11:58:57 +0100 Subject: [PATCH] Fix empty env --- service/templates/deployment.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/service/templates/deployment.yaml b/service/templates/deployment.yaml index 8422335..af20e59 100644 --- a/service/templates/deployment.yaml +++ b/service/templates/deployment.yaml @@ -174,8 +174,8 @@ spec: {{- end }} image: "{{ .Values.image.repository }}{{- if .Values.image.digest }}@{{ .Values.image.digest }}{{- else }}:{{ .Values.image.tag | default .Chart.AppVersion }}{{- end }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - env: {{ if (not .Values.deployment.env) }}[]{{ end }} - + {{- if (.Values.deployment.env) }} + env: {{- range $key, $value := .Values.deployment.env }} - name: {{ $key }} {{- if (not $value.type) }} @@ -205,6 +205,7 @@ spec: {{- end }} {{- end }} {{- end }} + {{- end }} {{- if (.Values.deployment.commands) }} command: [ {{- range $index, $cmd := .Values.deployment.commands }}