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

New simpler Docker image in 0.26.0 is insufficient (need removed features) #1481

Closed
eikenb opened this issue Jun 11, 2021 · 8 comments
Closed

Comments

@eikenb
Copy link
Contributor

eikenb commented Jun 11, 2021

I created this issue as I expect there to be a at least a few people form whom the new Docker images will break their current workflows. If this is you please comment here with...

  1. the image you currently use
  2. which features you rely on

I apologize for any inconvenience this may have caused and if a simple base image can't be made to work for everyone, I'll be sure to make getting a 0.26.1 with an updated docker image out a top priority. I didn't want to just propagate the old Docker setup as it needs some serious work, but I really wanted some feedback on what's currently used before doing that.

Thanks.

@jklawrence
Copy link

jklawrence commented Jun 14, 2021

  1. We were using 0.25.2-alpine.
  2. We relied on the ENTRYPOINT instruction to specify the executable /bin/consul-template for us.

We pass arguments for the consul-template executable directly in our Kubernetes deployment file's args field, like:

        args:
          [
            "-config=/path/to/mounted/hcl/file.hcl",
            "-log-level=debug",
            "-once",
          ]

Docker equivalent:

docker run hashicorp/consul-template -config=/path/to/mounted/hcl/file.hcl -log-level=debug -once

Now that there is no entrypoint we need to specify the executable in addition to its arguments:

        args:
          [
            "/bin/consul-template",
            "-config=/path/to/mounted/hcl/file.hcl",
            "-log-level=debug",
            "-once",
          ]

Docker equivalent:

docker run hashicorp/consul-template /bin/consul-template -config=/path/to/mounted/hcl/file.hcl -log-level=debug -once

@eikenb
Copy link
Contributor Author

eikenb commented Jun 14, 2021

Hey @jklawrence, thanks for replying. I really appreciate the feedback.

Mind if I ask how do you get the config file in the container? Do you include it as part of a derived image (using our image as a base image and extending it), or via a bind mount or some other way?

Thanks.

@jklawrence
Copy link

Hi @eikenb. We use the consul-template image directly and add the config file via a bind mount.

For background, we make use of both the vault and consul-template containers as initContainers to load secrets from our Vault instance and output formatted configuration file(s) for our application container.

@eikenb eikenb added this to the 0.26.1 milestone Jun 15, 2021
@eikenb
Copy link
Contributor Author

eikenb commented Jun 15, 2021

Thanks. I'll be pushing up a PR with a new Dockerfile + supporting scripts soon. Condensing things down to 1 Alpine Linux based image where I've reviewed, modernized and simplified things as I can.

@eikenb
Copy link
Contributor Author

eikenb commented Jun 15, 2021

PR is up... #1484.

@jklawrence
Copy link

Thank you @eikenb, that looks like that would work for us!

@eikenb
Copy link
Contributor Author

eikenb commented Jun 15, 2021

Thanks for the feedback @jklawrence.

I'm going to give it a few days to give others a (albeit small) chance to chime in and I'd like to get the new shell parsing issue in the update as well (waiting on upstream to review my PR there).

@eikenb
Copy link
Contributor Author

eikenb commented Jun 22, 2021

Merged the PR and I think it should be good for all the common use cases. I'm going to close this general bug and recommend people file new issues if needed.

@eikenb eikenb closed this as completed Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants