mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Change log level for pod manifest
This commit is contained in:
parent
55e045d9db
commit
a4e04bb633
@ -73,7 +73,7 @@ func new(path string, nodeName types.NodeName, period time.Duration, updates cha
|
||||
|
||||
func (s *sourceFile) run() {
|
||||
if err := s.watch(); err != nil {
|
||||
glog.Errorf("unable to read manifest path %q: %v", s.path, err)
|
||||
glog.Errorf("Unable to read manifest path %q: %v", s.path, err)
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,22 +136,22 @@ func (s *sourceFile) extractFromDir(name string) ([]*v1.Pod, error) {
|
||||
for _, path := range dirents {
|
||||
statInfo, err := os.Stat(path)
|
||||
if err != nil {
|
||||
glog.V(1).Infof("Can't get metadata for %q: %v", path, err)
|
||||
glog.Errorf("Can't get metadata for %q: %v", path, err)
|
||||
continue
|
||||
}
|
||||
|
||||
switch {
|
||||
case statInfo.Mode().IsDir():
|
||||
glog.V(1).Infof("Not recursing into manifest path %q", path)
|
||||
glog.Errorf("Not recursing into manifest path %q", path)
|
||||
case statInfo.Mode().IsRegular():
|
||||
pod, err := s.extractFromFile(path)
|
||||
if err != nil {
|
||||
glog.V(1).Infof("Can't process manifest file %q: %v", path, err)
|
||||
glog.Errorf("Can't process manifest file %q: %v", path, err)
|
||||
} else {
|
||||
pods = append(pods, pod)
|
||||
}
|
||||
default:
|
||||
glog.V(1).Infof("Manifest path %q is not a directory or file: %v", path, statInfo.Mode())
|
||||
glog.Errorf("Manifest path %q is not a directory or file: %v", path, statInfo.Mode())
|
||||
}
|
||||
}
|
||||
return pods, nil
|
||||
|
@ -89,7 +89,7 @@ func (s *sourceFile) processEvent(e *inotify.Event) error {
|
||||
var eventType podEventType
|
||||
switch {
|
||||
case (e.Mask & inotify.IN_ISDIR) > 0:
|
||||
glog.V(1).Infof("Not recursing into manifest path %q", s.path)
|
||||
glog.Errorf("Not recursing into manifest path %q", s.path)
|
||||
return nil
|
||||
case (e.Mask & inotify.IN_CREATE) > 0:
|
||||
eventType = podAdd
|
||||
@ -111,7 +111,7 @@ func (s *sourceFile) processEvent(e *inotify.Event) error {
|
||||
switch eventType {
|
||||
case podAdd, podModify:
|
||||
if pod, err := s.extractFromFile(e.Name); err != nil {
|
||||
glog.Errorf("can't process manifest file %q: %v", e.Name, err)
|
||||
glog.Errorf("Can't process manifest file %q: %v", e.Name, err)
|
||||
} else {
|
||||
return s.store.Add(pod)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user