-
Notifications
You must be signed in to change notification settings - Fork 139
Description
Background
Many configuration options, particularly those found in fs/config/config.go, can be tuned to optimize the user experience and performance of stargz-snapshotter. Currently, applying any configuration change requires a full restart of the snapshotter. This process can be disruptive and costly for users, especially in production environments where running containers depend on the snapshotter and must also be restarted.
Proposal
To address this limitation, we can introduce a configuration hot reloading mechanism. This would allow users to apply configuration changes dynamically without interrupting service.
The implementation could follow these steps:
- Monitor Configuration File Changes: Use a library like
fsnotifyto watch the configuration file for modifications. - Propagate Configuration Updates: Add methods to relevant components—from the top-level snapshotter down to the layer management logic—to support dynamic configuration updates.
- Chain of Updates: When a configuration change is detected, trigger a chained update sequence that propagates the new settings throughout the system.
Benefits
With this feature, newly pulled images would immediately benefit from the updated configuration, while existing operations remain unaffected. This would significantly improve the flexibility and manageability of stargz-snapshotter in dynamic environments.