chore: Replace NewReflector with NewReflectorWithOptions func
This commit is contained in:
parent
d1e717911b
commit
74d226ccf0
|
|
@ -603,7 +603,7 @@ func (b *Builder) startReflector(
|
|||
useAPIServerCache bool,
|
||||
) {
|
||||
instrumentedListWatch := watch.NewInstrumentedListerWatcher(listWatcher, b.listWatchMetrics, reflect.TypeOf(expectedType).String(), useAPIServerCache)
|
||||
reflector := cache.NewReflector(sharding.NewShardedListWatch(b.shard, b.totalShards, instrumentedListWatch), expectedType, store, 0)
|
||||
reflector := cache.NewReflectorWithOptions(sharding.NewShardedListWatch(b.shard, b.totalShards, instrumentedListWatch), expectedType, store, cache.ReflectorOptions{ResyncPeriod: 0})
|
||||
go reflector.Run(b.ctx.Done())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ func serviceCollector(kubeClient clientset.Interface) *metricsstore.MetricsStore
|
|||
},
|
||||
}
|
||||
|
||||
r := cache.NewReflector(&lw, &v1.Service{}, store, 0)
|
||||
r := cache.NewReflectorWithOptions(&lw, &v1.Service{}, store, cache.ReflectorOptions{ResyncPeriod: 0})
|
||||
|
||||
go r.Run(context.TODO().Done())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue