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

Configure -once via config.hcl #247

Open
Skaronator opened this issue Oct 28, 2020 · 3 comments
Open

Configure -once via config.hcl #247

Skaronator opened this issue Oct 28, 2020 · 3 comments

Comments

@Skaronator
Copy link

Envconsul version

envconsul v0.10.0 (1835ce9)

Configuration

once = true

Command

envconsul -config /etc/envconsul.hcl

Debug output

2020/10/28 09:56:29 [ERR] (cli) from file: /etc/envconsul.hcl: mapstructure decode failed: 1 error(s) decoding:

* '' has invalid keys: once

Expected behavior

What should have happened?

envconsul should start the same way it would do as with "-once" parameter

Actual behavior

What actually happened?

envconsul crash with the reason that "once" is not a valid config entry.

Steps to reproduce

  1. create a config where once = true
  2. start envconsul with this config
  3. envconsul crashes

References

Are there any other GitHub issues (open or closed) that should be linked here?
For example:

  • GH-1234
  • ...
@eikenb
Copy link
Contributor

eikenb commented Oct 28, 2020

Hey @Skaronator, thanks for taking the time to submit this issue.

We are trying to standardize our various tools cli/config options around the ideas that cli options control the binary behavior where the config options control the application behavior. This means we really don't want to add a once config option.

I would like to ask what issue you are trying to solve with this request? In case we might have some alternative solutions to offer.

@Skaronator
Copy link
Author

Hi @eikenb, I'm trying to configure envconsul in only one place. At first I was using only the CLI parameters in my Dockerfile which was fine until I had to set consul.retry.max_backoff which doesn't seem to be available as CLI parameter. So I had to switch to the config file and moved all my CLI Paramters in that config file to have everything on one place but as it turns out I cannot set the -once flag via config.

Now we have this config file but everyone else in the team need to remember that this one option is set in the Dockerfile and not in the configuration with the rest of envconsul. :/

I would highly appreciate to have all config option available as CLI parameter as well as config file parameter.

@eikenb
Copy link
Contributor

eikenb commented Oct 29, 2020

Does the software you are running with exec support exiting after its run? If the exec'd program exits, envconsul doesn't try to restart it and exits as well.

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