Browse Source
The config file watcher assumed a simple configuration where the existing configuration file is overwritten by a text editor. In practice this does not detect some more complex configuration change scenarios such as : * The configuration file is behind a symlink and the symlink is updated * The configuration file is behind a double symlink (k8s configmap update) * The configuration file is not updated but removed the re-created In order to fix these cases : * Watch the configuration file parent directory instead of the file itself, this lets us grab events event if the file was removed and a new file is used. * In addition to read/write event matching, watch for any change in the configuration file path. This handles the symlink case where the file itself hasn't changed but its location did v2: - apply gofmtpull/190/head
1 changed files with 20 additions and 7 deletions
Loading…
Reference in new issue