Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to use envconsul to dynamically fetch environment variables #101

Merged
merged 24 commits into from
Jun 25, 2018

Conversation

odavid
Copy link
Owner

@odavid odavid commented Jun 25, 2018

When using Environment Variable Substitution within the config.yml file, you can direct the container to automatically fetch them from from consul and vault using envconsul

The following environment variables need to be provided in order to support it:

  • ENVCONSUL_CONSUL_PREFIX - Comma separated values of consul key prefixes - Mandatory if using consul to fetch information
  • CONSUL_ADDR - Consul address (host:port) - Mandatory if using consul to fetch information
  • CONSUL_TOKEN - Consul ACL Token - The token that used to be authorize the container to fetch the keys from consul - Mandatory if consul ACLs are in use
  • ENVCONSUL_VAULT_PREFIX - Comma separated values of vault key prefixes - Mandatory if using vault to fetch information
  • VAULT_ADDR - Vault address (http[s]://host:port) - Mandatory if using vault to fetch information
  • VAULT_TOKEN - Vault ACL Token - The token that used to be authorize the container to fetch the keys from vault - Mandatory
  • ENVCONSUL_UNWRAP_TOKEN - true/false (default = false), see - tells Envconsul that the provided token is actually a wrapped token that should be unwrapped using Vault's cubbyhole response wrapping
  • ENVCONSUL_MAX_RETRIES - (default = 5), How many time the envconsul will retry to fetch data
  • ENVCONSUL_ADDITIONAL_ARGS - A list of command line arguments to append to the envconsul CLI. For more details, please read the envconsul READM

The following parameters are being added to the envconsul CLI:

  • -sanitize - replaces all invalid characters to underscore
  • -upcase - All keys will become Uppercase

Due to An open Issue with envconsul and vault > 0.9.6, Only Vault versions <= 0.9.6 can be used

@odavid odavid merged commit 433dc64 into master Jun 25, 2018
@odavid odavid changed the title Using envconsul to dynamically fetch environment variables Ability to use [envconsul](https://github.com/hashicorp/envconsul) to dynamically fetch environment variables Jun 25, 2018
@odavid odavid changed the title Ability to use [envconsul](https://github.com/hashicorp/envconsul) to dynamically fetch environment variables Ability to use envconsul to dynamically fetch environment variables Jun 25, 2018
@odavid odavid deleted the consul-vault branch June 25, 2018 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant