mirror of https://github.com/k3s-io/k3s
fix dynamic informer tweakListOptions
parent
59beb8c36b
commit
94b0bd897d
|
@ -45,6 +45,7 @@ func NewFilteredDynamicSharedInformerFactory(client dynamic.Interface, defaultRe
|
|||
namespace: metav1.NamespaceAll,
|
||||
informers: map[schema.GroupVersionResource]informers.GenericInformer{},
|
||||
startedInformers: make(map[schema.GroupVersionResource]bool),
|
||||
tweakListOptions: tweakListOptions,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +59,7 @@ type dynamicSharedInformerFactory struct {
|
|||
// startedInformers is used for tracking which informers have been started.
|
||||
// This allows Start() to be called multiple times safely.
|
||||
startedInformers map[schema.GroupVersionResource]bool
|
||||
tweakListOptions TweakListOptionsFunc
|
||||
}
|
||||
|
||||
var _ DynamicSharedInformerFactory = &dynamicSharedInformerFactory{}
|
||||
|
@ -72,7 +74,7 @@ func (f *dynamicSharedInformerFactory) ForResource(gvr schema.GroupVersionResour
|
|||
return informer
|
||||
}
|
||||
|
||||
informer = NewFilteredDynamicInformer(f.client, gvr, f.namespace, f.defaultResync, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, nil)
|
||||
informer = NewFilteredDynamicInformer(f.client, gvr, f.namespace, f.defaultResync, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
f.informers[key] = informer
|
||||
|
||||
return informer
|
||||
|
|
Loading…
Reference in New Issue