Bump min watch timeout for secret & configmap manager in Kubelet

This commit is contained in:
Wojciech Tyczyński 2024-04-09 09:22:28 +02:00
parent 29e38c19b8
commit 36141fa6fb

View File

@ -224,12 +224,16 @@ func (c *objectCache) newReflectorLocked(namespace, name string) *objectCacheIte
return c.watchObject(namespace, options)
}
store := c.newStore()
reflector := cache.NewNamedReflector(
fmt.Sprintf("object-%q/%q", namespace, name),
reflector := cache.NewReflectorWithOptions(
&cache.ListWatch{ListFunc: listFunc, WatchFunc: watchFunc},
c.newObject(),
store,
0,
cache.ReflectorOptions{
Name: fmt.Sprintf("object-%q/%q", namespace, name),
// Bump default 5m MinWatchTimeout to avoid recreating
// watches too often.
MinWatchTimeout: 30 * time.Minute,
},
)
item := &objectCacheItem{
refMap: make(map[types.UID]int),