minhdanh / helm-vault-template

Helm plugin that intergrates with Vault to render a template file with Vault paths to a file. Useful to prepare a values.yaml file to deploy a helm chart.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

helm-vault-template

This plugin intergrates with Vault to render a template file with Vault paths to a file. Useful to prepare a values.yaml file to deploy a helm chart.

Installation

helm plugin install https://github.com/minhdanh/helm-vault-template

Usage

NAME:
   helm-vault-template - Render a template file

USAGE:
   helm-vault-template [global options] command [arguments...]

VERSION:
   0.0.1

COMMANDS:
     render       Render a template file to a file
     help, h      Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --vault.token value                     Vault token [$VAULT_TOKEN]
   --vault.address value                   Vault API endpoint [$VAULT_ADDR]
   --help, -h                              show help
   --version, -v                           print the version

Examples

Prepare a template file values.vault.yaml.

config:
  username: {{ vault "secret/data/myservice/admin-user" "username" }}
  password: {{ vault "secret/data/myservice/admin-user" "password" }}

To render the template:

helm vault-template render values.vault.yaml values.yaml

values.yaml will look like:

config:
  username: admin
  password: P@ssw0rd

You can also print the output file to stdout:

helm vault-template render values.vault.yaml -

About

Helm plugin that intergrates with Vault to render a template file with Vault paths to a file. Useful to prepare a values.yaml file to deploy a helm chart.

License:MIT License


Languages

Language:Go 72.1%Language:Shell 20.3%Language:Makefile 7.6%