-
Notifications
You must be signed in to change notification settings - Fork 781
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
Consul Template does not render templates before exec in Alpine Docker Image #1207
Comments
The template I was using was
When I remove the global |
I'm trying to figure out why you'd want both Basically I'm curious if you have a use case where both wait and once make sense together. Thanks. |
Right, so my thought was that The use case I have is related to rendering a HAProxy template. (bear with me) So I have the application, HAProxy, which consumes multiple configurations which are rendered from Consul Template. When the application starts up, it needs the configurations to all be there, otherwise we get in a restart loop. So what I do is run Consul Template in If you are familiar with Kubernetes, this looks like using the same container image for an My workaround for this was to have two configurations, which can be specified via the CLI when starting Consul Template. I'm fine if you want to call this user error, but it threw me for a loop and several hours of debugging before I figured out exactly what I was doing. As you describe it, which makes complete sense, maybe we should be disabling or raising an exception if both |
Your idea/use-case makes total sense to me and having to have duplicate config files shouldn't be necessary. It should just do the right thing... which IMO is that if you specify Thanks for the feedback, it is greatly appreciated. |
Consul Template version
v0.20.0
Configuration
Here is a repo with all of the files necessary to reproduce. The README shows how to run it locally and in docker.
Expected behavior
They should both behave the way the local version of consul-template is working, which is each template is rendered and after all templates are rendered, then exec is run.
Actual behavior
The docker version of consul-template (1) is not tested from what I can tell and (2) in Docker alpine, exec is run before the templates are actually rendered, which breaks because my exec expects the templates to be there.
Steps to reproduce
See the linked repo README for instructions on running the reproduction
The text was updated successfully, but these errors were encountered: