Skip to content

Commit

Permalink
Revert "Allow fsnotify to reload config files on k8s (or symlinks)"
Browse files Browse the repository at this point in the history
  • Loading branch information
juliens committed Mar 3, 2020
1 parent e9d0a16 commit 67e17de
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions pkg/provider/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,6 @@ func (p *Provider) addWatcher(pool *safe.Pool, directory string, configurationCh
case <-ctx.Done():
return
case evt := <-watcher.Events:
if evt.Op == fsnotify.Remove {
err = watcher.Remove(evt.Name)
if err != nil {
log.WithoutContext().WithField(log.ProviderName, providerName).
Errorf("Could not remove watcher for %s: %s", directory, err)
}
err = watcher.Add(directory)
if err != nil {
log.WithoutContext().WithField(log.ProviderName, providerName).
Errorf("Could not re-add watcher for %s: %s", directory, err)
}
}

if p.Directory == "" {
_, evtFileName := filepath.Split(evt.Name)
_, confFileName := filepath.Split(p.Filename)
Expand Down

0 comments on commit 67e17de

Please sign in to comment.