You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Hi @jondavidnd1. Would you be able to try this out in a K8s environment and perhaps send a PR? I am not familiar with K8s and don't have an env handy either?
To test, you can just copy the file provider code locally, tweak it, and plug that into koanf as the provider interface.
@knadh I have manually tested the above PR against my use case and the standard use case creates, writes, removes on a normal file. Please have a look when you have time.
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):
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
withrealPath
, and if they are different, consider that an event that should trigger the watch function.The text was updated successfully, but these errors were encountered: