diff --git a/incubator/monochart/Chart.yaml b/incubator/monochart/Chart.yaml index 81286391..57902270 100644 --- a/incubator/monochart/Chart.yaml +++ b/incubator/monochart/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 description: A declarative helm chart for deploying common types of services on Kubernetes name: monochart -version: 0.25.0 -appVersion: 0.25.0 +version: 0.25.1 +appVersion: 0.25.1 home: https://github.com/cloudposse/charts/tree/master/incubator/monochart icon: https://raw.githubusercontent.com/cloudposse/charts/master/incubator/monochart/logo.png maintainers: diff --git a/incubator/monochart/templates/_helpers.tpl b/incubator/monochart/templates/_helpers.tpl index 70e4eb86..a8c355f2 100644 --- a/incubator/monochart/templates/_helpers.tpl +++ b/incubator/monochart/templates/_helpers.tpl @@ -64,8 +64,9 @@ env: {{/* https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/#use-pod-fields-as-values-for-environment-variables */}} -{{- with $root.Values.envFromFieldRefFieldPath }} +{{- if $root.Values.envFromFieldRefFieldPath | or $root.Values.envFromSecretKeyRef }} env: +{{- with $root.Values.envFromFieldRefFieldPath }} {{- range $name, $value := . }} - name: {{ $name }} valueFrom: @@ -78,11 +79,12 @@ https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-envir */}} {{- with $root.Values.envFromSecretKeyRef }} {{- range $data := . }} - - name: {{ $data.name }} + - name: {{ default "" $data.name | quote }} valueFrom: secretKeyRef: - name: {{ $data.secret }} - key: {{ $data.key }} + name: {{ default "" $data.secret | quote }} + key: {{ default "" data.key | quote }} +{{- end }} {{- end }} {{- end }} {{- end -}}