Skip to content

Commit

Permalink
Fix empty env
Browse files Browse the repository at this point in the history
  • Loading branch information
bork91 committed Nov 7, 2024
1 parent 4dea496 commit 9fa7f35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down Expand Up @@ -205,6 +205,7 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if (.Values.deployment.commands) }}
command: [
{{- range $index, $cmd := .Values.deployment.commands }}
Expand Down

0 comments on commit 9fa7f35

Please sign in to comment.