Skip to content

Instantly share code, notes, and snippets.

@brunopadz
Created January 14, 2022 14:58
Show Gist options
  • Save brunopadz/752ff0393d1196a956f8a09148d18dec to your computer and use it in GitHub Desktop.
Save brunopadz/752ff0393d1196a956f8a09148d18dec to your computer and use it in GitHub Desktop.
Consul template inside a Helm Chart
# 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 }} `}}
@brunopadz
Copy link
Author

🇧🇷 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 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment