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

[reloader] Add support for multiple config files #171

Closed
wants to merge 2 commits into from
Closed

[reloader] Add support for multiple config files #171

wants to merge 2 commits into from

Conversation

schancel
Copy link
Contributor

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.

pkg/reloader/reloader.go Outdated Show resolved Hide resolved
@wallyqs
Copy link
Member

wallyqs commented Apr 13, 2019

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"}
Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schancel
Copy link
Contributor Author

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.
@schancel
Copy link
Contributor Author

Pushed up a commit to figure out why e2e test blew up... :/

@wallyqs
Copy link
Member

wallyqs commented Apr 27, 2019

Picked commit 38a67d9 from the branch and merged. Changes to the reloader should not have affected the results from the e2e tests, so taking a look at fixing the flapping test at #178

@wallyqs wallyqs closed this Apr 27, 2019
wallyqs pushed a commit to wallyqs/nats-operator that referenced this pull request Apr 28, 2019
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
wallyqs pushed a commit to wallyqs/nats-operator that referenced this pull request Apr 29, 2019
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
pires pushed a commit that referenced this pull request Apr 29, 2019
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants