habitat
habitat copied to clipboard
Make configuration dynamically configurable
You should be able to configure certain attributes of the supervisor itself and running services on the fly without requiring a restart.
This probably involves:
- putting configuration in some sort of global singleton
- reading configuration from this singleton on every use instead of caching the value
- providing a way to subscribe to specific changes
- adding a command to patch the configuration
Random thought: a new command to signal the Supervisor to re-read its configuration file on-demand could be useful, or perhaps adding a file-watching setup, as we do with other parts of the Supervisor. Both require a bit of code, and the file-watching may end up using another thread. The automatic nature of the file-watching is may provide a better user experience; however, signaling-to-reload-configuration is a well-known operational pattern, and provides the most direct control of when configuration changes.
It's possible we could provide both eventually, but the explicitness of a reload command is nice, and provides a very clear interface for integrating with other tooling.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.