{{ define “env” }} {{- range $key, $val := .Values.environment }}
-
name: {{ $key }} {{- if hasPrefix “valueFrom:” $val }} {{- tpl $val $ | nindent 2 }} {{- else }} value: {{ tpl $val $ | quote }} {{- end }}
{{- end}} # This is in this file because we can't have conditionals in `values.yaml`. {{- if .Values.redis.enabled }}
-
name: REDIS_URL value: “redis://{{ .Release.Name }}-redis-master:{{ .Values.redis.redisPort }}”
{{- end }} {{ end }}