Created
January 14, 2022 14:58
-
-
Save brunopadz/752ff0393d1196a956f8a09148d18dec to your computer and use it in GitHub Desktop.
Consul template inside a Helm Chart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This example demonstrates how to use Consult templates inside a Helm Chart | |
# It's kinda useful when using Vault Agent Injector :) | |
# We basically have to use `s to escape all templating resources | |
vault.hashicorp.com/agent-inject-template-env: | | |
{{ `{{ with secret "`}} {{- $.Values.app.env -}}/data/{{ .Values.app.name }} {{`" }} | |
{{ range $k, $v := .Data.data }} | |
export {{ $k }}="{{ $v }}" | |
{{ end }} | |
{{ end }} `}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🇧🇷 Esse exemplo demonstra como utilizar Consul Templates dentro de Helm Charts
É algo bem útil quando utilizamos o Vault Agent Injector e precisamos passar as configurações dentro das annotations
Basicamente precisamos utilizar ` nos recursos do template 😃