-
Notifications
You must be signed in to change notification settings - Fork 118
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
Use CLI flags for configuration instead of environment variables #113
Comments
Hi @sisp environment variables are used to configure 12-factor apps rather than flags. I would consider the variables used in the watchdog as reserved. Unless you have a concrete problem, where this is clashing for you and causing an issue, I'd suggest we leave things as they are and close this issue. Thank you for your concern. Alex |
Hi @alexellis, I automatically extend user-provided Docker images with If you have a strong opinion about using environment variables, how about prefixing the |
I'm unaware of your usage of OpenFaaS and this is the first time we've heard from you. It may make your case stronger, if you're seen to participate in the community and build some goodwill and relationship with the community. For your reference, here are a list of environment variables in use. https://github.com/openfaas/of-watchdog#configuration If you can show this to be a genuine problem rather than a hypothesis, we would give it some more thought. So far this hasn't been any issue that we've been aware of by any of our users. Alex |
That's true, I've been using OpenFaaS for about a year and it has worked great so far, so there was no need to engage on GitHub. But I'm happy to discuss with the larger community about my case.
Thanks for referencing the configuration list. I'm aware of it and understand how
I'm building a small wrapper CLI around Does this make my case a bit clearer? 🙂 |
Expected Behaviour
of-watchdog
should be configurable using CLI flags instead of environment variables.Current Behaviour
of-watchdog
is only configurable using environment variables.Possible Solution
Add CLI flags for configuration. To retain backward compatibility, environment variables can be used when no CLI flags are provided. If at least one CLI flag is provided, environment variables should be ignored and the default value of any unprovided CLI flag should be used instead.
Context
of-watchdog
starts a webserver in a child process, i.e.of-watchdog
and the actual webserver run in the same environment (typically a Docker container). It is possible (and likely) that the webserver is also configured using environment variables, and there is a chance that some environment variables are the same forof-watchdog
and the webserver. This can lead to a bad configuration, e.g. if the webserver uses the environment variableport
(which is used byof-watchdog
, too),of-watchdog
is configured to listen on the same port as the webserver which (a) is unexpected and (b) leads to a port collision.The text was updated successfully, but these errors were encountered: