mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-25 06:31:35 +00:00
Merge pull request #119796 from sttts/sttts-caches-populated
client-go: log proper 'caches populated' message, with type and source and only once Kubernetes-commit: 03e845f882b2ab1f1a34deee36f06945cfa259d2
This commit is contained in:
commit
54237a55bc
4
tools/cache/reflector.go
vendored
4
tools/cache/reflector.go
vendored
@ -337,7 +337,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
|
|||||||
if !apierrors.IsInvalid(err) {
|
if !apierrors.IsInvalid(err) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
klog.Warning("the watch-list feature is not supported by the server, falling back to the previous LIST/WATCH semantic")
|
klog.Warning("The watch-list feature is not supported by the server, falling back to the previous LIST/WATCH semantics")
|
||||||
fallbackToList = true
|
fallbackToList = true
|
||||||
// Ensure that we won't accidentally pass some garbage down the watch.
|
// Ensure that we won't accidentally pass some garbage down the watch.
|
||||||
w = nil
|
w = nil
|
||||||
@ -351,6 +351,8 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
klog.V(2).Infof("Caches populated for %v from %s", r.typeDescription, r.name)
|
||||||
|
|
||||||
resyncerrc := make(chan error, 1)
|
resyncerrc := make(chan error, 1)
|
||||||
cancelCh := make(chan struct{})
|
cancelCh := make(chan struct{})
|
||||||
defer close(cancelCh)
|
defer close(cancelCh)
|
||||||
|
2
tools/cache/shared_informer.go
vendored
2
tools/cache/shared_informer.go
vendored
@ -334,11 +334,9 @@ func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool
|
|||||||
},
|
},
|
||||||
stopCh)
|
stopCh)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.V(2).Infof("stop requested")
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
klog.V(4).Infof("caches populated")
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user