From 3dd49cac66984317d0672b3c021daba05964b491 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 6 Apr 2018 09:04:08 +0200 Subject: [PATCH] Add explanation for envvar interpolation and examples to readme --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 0ded704f..d9f9bbb1 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,30 @@ releases: ``` +## Using environment variables + +Environment variables can be used in most places for templating the helmfile. Currently this is supported for `name`, `namespace`, `value` (in set) and `url` (in repositories). + +Examples: + +```yaml +respositories: +- name: your-private-git-repo-hosted-charts + url: "https://{{ env \"GITHUB_TOKEN\"}}@raw.githubusercontent.com/kmzfs/helm-repo-in-github/master/" +``` + +```yaml +releases: + - name: "{{ env \"NAME\" }}-vault + namespace: "{{ env \"NAME\" }}" + chart: roboll/vault-secret-manager + set: + - name: proxy.domain + value: "{{ env \"PLATFORM_ID\" }}.my-domain.com" +``` + +**Note**: The quotes (`"{{ env \"EXAMPLE\" }}"`) as well as the escaping inside are necessary, because `{` and `}` have a [special meaning in the YAML format](http://yaml.org/spec/1.2/spec.html#id2790832). + ## installation - `go get github.com/roboll/helmfile` or