-
Notifications
You must be signed in to change notification settings - Fork 112
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
[reloader] Add support for multiple config files #171
Conversation
Sent PR to the branch with a couple of fixes: https://github.com/schancel/nats-operator/compare/multi-reloader...wallyqs:multi-reloader?expand=1 |
cmd/reloader/main.go
Outdated
fs.IntVar(&nconfig.MaxRetries, "max-retries", 5, "Max attempts to trigger reload") | ||
fs.IntVar(&nconfig.RetryWaitSecs, "retry-wait-secs", 2, "Time to back off when reloading fails before retrying") | ||
|
||
fs.Parse(os.Args[1:]) | ||
|
||
nconfig.ConfigFiles = fileSet | ||
if len(fileSet) == 0 { | ||
nconfig.ConfigFiles = []string{"/etc/nats/gnatsd.conf"} |
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.
Do you want me to change this to /etc/nats-config/gnatsd.conf
. I didn't want to change behavior, but I doubt anyone is using that? It's always set explicitly to the above by the operator it seems.
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.
sounds good to me to change to what actually is being used, thanks
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, would be great to update this test here too https://github.com/nats-io/nats-operator/blob/master/test/reloader/reloader_test.go
Can do tomorrow. |
Currently the config file expects there to only be one config file watched. However, the nats config file can include other paths, and we may also want to watch those. This commit implements being able to specify an arbtirary number of configuration files to be watched.
Pushed up a commit to figure out why e2e test blew up... :/ |
This commit adds support from reading the authorization section of the gnatsd config from a JSON file located within the nats-operator container. This allows secrets the data to be placed on disk using sidecars like consul-template. Depends on nats-io#171
This commit adds support from reading the authorization section of the gnatsd config from a JSON file located within the nats-operator container. This allows secrets the data to be placed on disk using sidecars like consul-template. Depends on nats-io#171
* Enable specifing a `ClientsAuthFile` for user authorization data This commit adds support from reading the authorization section of the gnatsd config from a JSON file located within the nats-operator container. This allows secrets the data to be placed on disk using sidecars like consul-template. Depends on #171 * Fixes to support auth file include Signed-off-by: Waldemar Quevedo <[email protected]> * Update images used by upgrade test Signed-off-by: Waldemar Quevedo <[email protected]> * Increase timeout of test to 20m Signed-off-by: Waldemar Quevedo <[email protected]> * Update reloader test Signed-off-by: Waldemar Quevedo <[email protected]> * Update manifest example for auth file Signed-off-by: Waldemar Quevedo <[email protected]>
Currently the config file expects there to only be one config file
watched. However, the nats config file can include other paths, and
we may also want to watch those.
This commit implements being able to specify an arbtirary number of
configuration files to be watched.