mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #47643 from CaoShuFeng/golang.org/x/exp/inotify
Automatic merge from submit-queue (batch tested with PRs 46336, 47643) Fix invalid filename in kubelet log Fixes: https://github.com/kubernetes/kubernetes/issues/47641 **Release note**: ``` NONE ```
This commit is contained in:
commit
956acc2bd8
@ -23,6 +23,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
@ -44,6 +45,9 @@ type sourceFile struct {
|
||||
}
|
||||
|
||||
func NewSourceFile(path string, nodeName types.NodeName, period time.Duration, updates chan<- interface{}) {
|
||||
// "golang.org/x/exp/inotify" requires a path without trailing "/"
|
||||
path = strings.TrimRight(path, string(os.PathSeparator))
|
||||
|
||||
config := new(path, nodeName, period, updates)
|
||||
glog.V(1).Infof("Watching path %q", path)
|
||||
go wait.Forever(config.run, period)
|
||||
|
Loading…
Reference in New Issue
Block a user