Fix traefik "additional_env_var" not saving
Came across a bug when entering key/value pairs under additional_env_var
for the traefik configuration in the vault. I think this stems from moving secrets that were originally in config.yml
into vault.yml
I wanted to setup Traefik to use DNS challenge with Namecheap. But whenever I saved the following in the vault
NAMECHEAP_API_USER: USERNAME
NAMECHEAP_API_KEY: APIKEY
it was being overwritten. with the default
CF_API_EMAIL: "{{ vault.traefik.additional_env_vars.CF_API_EMAIL }}"
CF_API_KEY: "{{ vault.traefik.additional_env_vars.CF_API_KEY }}"
I've updated both the vault.yml
and config.yml
to loop over the addition_env_var
variable. The only issue I've come across is that on the initial run the defaults I added within the else
statement in vault.yml
don't make it into config.yml
until the second time make
is run.