Skip to content

Commit

Permalink
charts/common/templates/lib/controller/_container.tpl: use envFrom se…
Browse files Browse the repository at this point in the history
…ction if defined in values.yaml

fixes nicholaswilde#70
  • Loading branch information
Johannes Kastl committed Feb 28, 2022
1 parent 6a69568 commit 5afa009
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion charts/common/templates/lib/controller/_container.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@ The main container included in the controller.
securityContext:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if or .Values.env .Values.secret }}
{{- if or .Values.env .Values.secret .Values.envFrom }}
envFrom:
{{- if .Values.env }}
- configMapRef:
name: {{ include "common.names.fullname" . }}
{{- end }}
{{- if .Values.envFrom }}
{{- with .Values.envFrom }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- if .Values.secret }}
- secretRef:
name: {{ include "common.names.fullname" . }}
{{- end }}
{{- end }}
{{- end }}
{{- include "common.controller.ports" . | trim | nindent 2 }}
volumeMounts:
{{- range $index, $PVC := .Values.persistence }}
Expand Down

0 comments on commit 5afa009

Please sign in to comment.