-
Notifications
You must be signed in to change notification settings - Fork 187
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
Allow config parsing on supervise mode only with run
subcommand
#1931
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
Semantics are still slightly confusing and will probably need to be worked upon to avoid misunderstandings within the code base. |
What if there is no /etc/ocis/proxy.json ? Will the proxy then be started with default settings? I find it confusing that |
Yes, this is also an issue.
Me too, and I don't like the inconsistency, that's why I added that last comment. It is confusing and it needs a better thought process, but we literally have our hands tied due to Viper not being thread safe setup for a bad design :/ |
After #1929 I also run into this because I cannot configure the proxy with its configuration file. Even if I explicitly set it via environment variable |
A known issue that needs to be considered is the following: What should we do when we have a global ocis.yaml config file configuring all services and individual config files i.e: proxy.yaml? What should be the outcome of the following sequence of commands:
What could we expect from running (3) ? Should the proxy config in the global ocis.yaml take precedence over the single more granular proxy.yaml? Should both be considered and have their values merged? The conundrum here is that we wouldn't only be talking here about source priorities on ENV var vs. CLI vs. config file but also between config files. |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as quick fix, create ADR as followup
What?
What the descriptions says. Currenntly it is not possible to parse a single config file from an extension when running on supervised mode.
a) global ocis config file on /etc/ocis/ocis.yaml with the contents:
b) a proxy config file /etc/ocis/proxy.json with the contents:
Running everything:
this works for me with the changes on this branch: https://github.com/owncloud/ocis/tree/parse-config-when-run
it also supports this use case:
and you should end up with 2 proxy instances bound to different ports.
A known issue that needs to be considered is the following: What should we do when we have a global ocis.yaml config file configuring all services and individual config files i.e: proxy.yaml? What should be the outcome of the following sequence of commands:
ocis server
// with a global ocis.yaml in preconfigured locations (it configures a proxy)ocis kill proxy
// with a single proxy.yaml in the expected preconfigured locationsocis run proxy
What could we expect from running (3) ? Should the proxy config in the global ocis.yaml take precedence over the single more granular proxy.yaml? Should both be considered and have their values merged?
The conundrum here is that we wouldn't only be talking here about source priorities on ENV var vs. CLI vs. config file but also between config files.