mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-01 23:31:51 +00:00
Merge pull request #78991 from sallyom/reflector-too-old-warning-info
Reflector watchHandler: make 'The resourceVersion for ... watch is too old' log Info not Warning Kubernetes-commit: 1a15ce14473fb60bb817d1f29147ae7b70a0987e
This commit is contained in:
7
tools/cache/reflector.go
vendored
7
tools/cache/reflector.go
vendored
@@ -299,7 +299,12 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
|
|||||||
|
|
||||||
if err := r.watchHandler(w, &resourceVersion, resyncerrc, stopCh); err != nil {
|
if err := r.watchHandler(w, &resourceVersion, resyncerrc, stopCh); err != nil {
|
||||||
if err != errorStopRequested {
|
if err != errorStopRequested {
|
||||||
klog.Warningf("%s: watch of %v ended with: %v", r.name, r.expectedType, err)
|
switch {
|
||||||
|
case apierrs.IsResourceExpired(err):
|
||||||
|
klog.V(4).Infof("%s: watch of %v ended with: %v", r.name, r.expectedType, err)
|
||||||
|
default:
|
||||||
|
klog.Warningf("%s: watch of %v ended with: %v", r.name, r.expectedType, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user