-
Notifications
You must be signed in to change notification settings - Fork 173
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
put secret generated from annotations template to existing path / like consul destination directive #159
Comments
when change this (another path) the copy command also not working |
The inject-command is copying the settings file to /tmp/ on the vault-agent containers, not the app container, so I think that's why it's not working. If you can't specify an alternate location for the settings file, perhaps you can run the cp command in the app container, or create a symlink from /vault/secrets/globalsettings2.json to /app/globalsettings2.json in the app container. |
for tests i choose the /tmp/ folder - after run the container, the command not runs. If I myself run the command its put to the /tmp/ or /app/ works. |
workaround for .net core app is seeking the another path to gets the .json files return new ConfigurationBuilder() .SetBasePath(path) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .AddJsonFile("globalsettings.json", true, true) .AddJsonFile("/secrets/appsettings.json", optional: true, reloadOnChange: true) .AddJsonFile("/secrets/globalsettings.json", true, true) .AddEnvironmentVariables() .Build(); |
I too could use a feature like this, or even the ability to create subdirectories under the
Currently it won't work by mixing the contents of those secrets in a single folder like |
As a workaround, I was able to use the command feature like this:
It's not elegant but it should work for now. |
@stewartshea You may be able to make use of the Otherwise the upcoming release of vault-k8s will add an |
In my case I still needed to create arbitrary directory structures to support the way grafana is configured, but it looks like #158 may solve this for me. |
ex :
Is it possible to map this generated file from secrets to filepath like consul templates ?
destination = "/app/globalsettings.json"
ex.
vault.hashicorp.com/agent-inject-destination-globalsettings2.json: "/app/globalsettings.json"
Regards
Pawel
The text was updated successfully, but these errors were encountered: