Vault
Project structure
├── README.md
├── helmwave.yml
└── vaules-secret.yaml
Step 1. Create next secret
vault kv put secret/test hello=world
Step 2. Create helmwave.yml
repositories:
- name: bitnami
url: https://charts.bitnami.com/bitnami
releases:
- name: app
chart: bitnami/nginx
namespace: test
values:
- vaules-secret.yaml
Step 3. Create vaules-secret.yaml
{{ defineDatasource "vault" "vault:///secret/data/test" }} # `data` is required for vault kv2
secret: {{ (ds "vault").data.hello }}
revesion_of_secret: {{ (ds "vault").metadata.version }}
Step 4. Run helmwave build --templater gomplate
You will get
secret: world
revision_of_secret: 2
Debug with gomplate
- install gomplate binary
- run it in your console
gomplate -d "vault=vault+https:///secret/data/test" -i '{{(ds "vault").metadata.version}}'
gomplate -d "vault=vault+https:///secret/data/test" -i '{{(ds "vault").data.hello}}'
see gomplate docs here