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 }}