mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
Merge pull request #92265 from wojtek-t/cacher_logs
Add initialization logs to watchcache
This commit is contained in:
commit
403716626d
@ -399,6 +399,7 @@ func (c *Cacher) startCaching(stopChannel <-chan struct{}) {
|
|||||||
c.watchCache.SetOnReplace(func() {
|
c.watchCache.SetOnReplace(func() {
|
||||||
successfulList = true
|
successfulList = true
|
||||||
c.ready.set(true)
|
c.ready.set(true)
|
||||||
|
klog.V(1).Infof("cacher (%v): initialized", c.objectType.String())
|
||||||
})
|
})
|
||||||
defer func() {
|
defer func() {
|
||||||
if successfulList {
|
if successfulList {
|
||||||
@ -412,7 +413,7 @@ func (c *Cacher) startCaching(stopChannel <-chan struct{}) {
|
|||||||
// Also note that startCaching is called in a loop, so there's no need
|
// Also note that startCaching is called in a loop, so there's no need
|
||||||
// to have another loop here.
|
// to have another loop here.
|
||||||
if err := c.reflector.ListAndWatch(stopChannel); err != nil {
|
if err := c.reflector.ListAndWatch(stopChannel); err != nil {
|
||||||
klog.Errorf("unexpected ListAndWatch error: %v", err)
|
klog.Errorf("cacher (%v): unexpected ListAndWatch error: %v; reinitializing...", c.objectType.String(), err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user