add field selector for shared informer factory

This commit is contained in:
liuwei
2020-05-13 13:16:44 +08:00
parent 722f019745
commit 8bb40e2739

View File

@@ -184,7 +184,7 @@ func (o *SpokeAgentOptions) RunSpokeAgent(ctx context.Context, controllerContext
}
hubKubeInformerFactory := informers.NewSharedInformerFactory(hubKubeClient, 10*time.Minute)
// create an informer factory with cluster name field selector because we just need to handle the current spoke cluster
// create a cluster informer factory with name field selector because we just need to handle the current spoke cluster
hubClusterInformerFactory := clusterv1informers.NewSharedInformerFactoryWithOptions(
hubClusterClient,
10*time.Minute,