mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Ignore file start with dots
This commit is contained in:
		@@ -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:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user