mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Ignore file start with dots
This commit is contained in:
parent
b385a94fed
commit
cba9a90fd1
@ -22,6 +22,7 @@ package config
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"golang.org/x/exp/inotify"
|
"golang.org/x/exp/inotify"
|
||||||
@ -79,6 +80,11 @@ func (s *sourceFile) watch() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *sourceFile) processEvent(e *inotify.Event) 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
|
var eventType podEventType
|
||||||
switch {
|
switch {
|
||||||
case (e.Mask & inotify.IN_ISDIR) > 0:
|
case (e.Mask & inotify.IN_ISDIR) > 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user