Skip to content

Commit

Permalink
feat: make env setting more convenient
Browse files Browse the repository at this point in the history
  • Loading branch information
x-mass committed Feb 9, 2025
1 parent 8364f04 commit 49b5207
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 7 additions & 1 deletion templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ spec:
{{- end }}
{{- if .Values.deployment.env }}
env:
{{- toYaml .Values.deployment.env | nindent 12 }}
{{- with .Values.deployment.env }}
{{- range $key, $value := . }}
- name: {{ $key }}
value: "{{ $value }}"
{{- end }}
{{- end }}
{{- end }}
envFrom:
{{- if .Values.secrets.data }}
- secretRef:
Expand Down
3 changes: 1 addition & 2 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ deployment:
securityContext: null

env:
- name: ENV_VAR
value: "your_value_here"
ENV_NAME: "your_value_here"
# =====================

# Horizontal pod autoscaler
Expand Down

0 comments on commit 49b5207

Please sign in to comment.