-
Notifications
You must be signed in to change notification settings - Fork 173
Description
Describe the bug
I've mounted a kubernetes ConfigMap containing a YAML file onto a directory. My application can successfully read the config from the file on startup using the file provider. However, when attempting the watch the file, updates to the ConfigMap (which are available when reading the file), are not triggering the file watch function.
Expected behavior
I would expect that changes to the ConfigMap would eventually trigger the watch function.
Please provide the following information):
- OS: linux/kubernetes
- Koanf Version - v2.1.1, providers/file version - v1.0.0
Additional context
viper had a similar problem that was addressed in this issue: spf13/viper#284. I believe the fsnotify event loop should be updated to compare the curPath
with realPath
, and if they are different, consider that an event that should trigger the watch function.