diff --git a/pkg/kubelet/config/file_linux.go b/pkg/kubelet/config/file_linux.go index b13de49cce9..06216279183 100644 --- a/pkg/kubelet/config/file_linux.go +++ b/pkg/kubelet/config/file_linux.go @@ -22,6 +22,7 @@ package config import ( "fmt" "os" + "strings" "github.com/golang/glog" "golang.org/x/exp/inotify" @@ -79,6 +80,11 @@ func (s *sourceFile) watch() error { } func (s *sourceFile) processEvent(e *inotify.Event) error { + // Ignore file start with dots + if strings.HasPrefix(e.Name, ".") { + glog.V(4).Infof("Ignored pod manifest: %s, because it starts with dots", e.Name) + return nil + } var eventType podEventType switch { case (e.Mask & inotify.IN_ISDIR) > 0: