-
Notifications
You must be signed in to change notification settings - Fork 314
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
User-config Watcher #3898
User-config Watcher #3898
Commits on Jan 17, 2018
-
Rename and group watcher fields
Now that there are multiple watchers in the Manager struct, it makes sense to make the SpecWatcher field more descriptive. Also, there will be yet another watcher coming soon to the struct, so group them together. Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Lorenzo Manacorda committedJan 17, 2018 Configuration menu - View commit details
-
Copy full SHA for 23f9606 - Browse repository at this point
Copy the full SHA 23f9606View commit details -
It's used in several places, so a constant makes sense - it will be helpful in avoiding possible typos in strings that wouldn't be caught by a compiler. Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Lorenzo Manacorda committedJan 17, 2018 Configuration menu - View commit details
-
Copy full SHA for 4bf55e0 - Browse repository at this point
Copy the full SHA 4bf55e0View commit details -
Persist user config directory to allow reloading configuration therein
We will need to reload the user config everytime we notice that it has changed. To be able to do it, we need to remember which path for the user configuration was used when loading it for the first time. Also, we start differentiating the deprecated and recommended paths in the API, so user config watcher can easily tell if the path was deprecated or not. The deprecated paths will not be watched. Signed-off-by: Krzesimir Nowak <krzesimir@kinvolk.io>
Configuration menu - View commit details
-
Copy full SHA for a25d3bc - Browse repository at this point
Copy the full SHA a25d3bcView commit details -
Allow skipping the initial event in file watcher
Sometimes the initial event is problematic, because the initial existence of the file (or lack of it) was already handled. Getting the initial event could result in useless work being done again. Signed-off-by: Krzesimir Nowak <krzesimir@kinvolk.io> Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Configuration menu - View commit details
-
Copy full SHA for f1946a8 - Browse repository at this point
Copy the full SHA f1946a8View commit details -
Expose the watch delay FileWatcher is using.
The delay will be used by tests to make sure that they wait long enough for the watcher to be able to send events. Signed-off-by: Krzesimir Nowak <krzesimir@kinvolk.io>
Configuration menu - View commit details
-
Copy full SHA for 86fa371 - Browse repository at this point
Copy the full SHA 86fa371View commit details -
The UserConfigWatcher watches each service's user.toml file. It reacts on file creation, deletion and change, triggering a service reload and configuration. If a service has hooks defined, those are executed, otherwise the default actions are performed instead. Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io> Signed-off-by: Krzesimir Nowak <krzesimir@kinvolk.io>
Lorenzo Manacorda committedJan 17, 2018 Configuration menu - View commit details
-
Copy full SHA for 3a5448b - Browse repository at this point
Copy the full SHA 3a5448bView commit details -
Use UserConfigWatcher in Manager
In this commit the UserConfigWatcher is hooked into the Manager. The Manager can now handle events from the watcher and trigger a reload of services it is supervising on configuration change. Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Lorenzo Manacorda committedJan 17, 2018 Configuration menu - View commit details
-
Copy full SHA for a02e3a0 - Browse repository at this point
Copy the full SHA a02e3a0View commit details -
Update website documentation to reflect changes in this PR
There is a new logging key for the user config watcher. And some semantics of the reconfigure hook have changed. Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Lorenzo Manacorda committedJan 17, 2018 Configuration menu - View commit details
-
Copy full SHA for b4a81f9 - Browse repository at this point
Copy the full SHA b4a81f9View commit details -
Some functions were undocumented, some of them had wrong docs or typos, some of them needed a small update in docs after the reload-on-configuration-change work. Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Lorenzo Manacorda committedJan 17, 2018 Configuration menu - View commit details
-
Copy full SHA for fcdec28 - Browse repository at this point
Copy the full SHA fcdec28View commit details