[incubator/common] env from configmap (#7199)

* refactor(incubator.common): env from configmap

* refactor(incubator.common): bump version

* refactor(incubator.common): fix typo
This commit is contained in:
Alexander Babai
2018-08-20 09:30:55 -07:00
committed by k8s-ci-robot
parent 4e3544cf3c
commit 4719d542b0
2 changed files with 14 additions and 2 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
apiVersion: v1
description: Common chartbuilding components and helpers
name: common
version: 0.0.3
appVersion: 0.0.3
version: 0.0.4
appVersion: 0.0.4
home: https://helm.sh
maintainers:
- name: technosophos
+12
View File
@@ -6,6 +6,18 @@
value: {{ default "" $value | quote }}
{{- end -}}
{{- define "common.envvar.configmap" -}}
{{- $name := index . 0 -}}
{{- $configMapName := index . 1 -}}
{{- $configMapKey := index . 2 -}}
name: {{ $name }}
valueFrom:
configMapKeyRef:
name: {{ $configMapName }}
key: {{ $configMapKey }}
{{- end -}}
{{- define "common.envvar.secret" -}}
{{- $name := index . 0 -}}
{{- $secretName := index . 1 -}}