diff --git a/incubator/common/Chart.yaml b/incubator/common/Chart.yaml index 51d294a34e..4710e67706 100755 --- a/incubator/common/Chart.yaml +++ b/incubator/common/Chart.yaml @@ -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 diff --git a/incubator/common/templates/_envvar.tpl b/incubator/common/templates/_envvar.tpl index 832b60448b..709251f8f3 100644 --- a/incubator/common/templates/_envvar.tpl +++ b/incubator/common/templates/_envvar.tpl @@ -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 -}}