Cleanup ClusterClientSetFunc field in execution-controller

Signed-off-by: Poor12 <shentiecheng@huawei.com>
This commit is contained in:
Poor12 2022-07-22 11:38:46 +08:00
parent 189368ab1e
commit f9f81280dc
3 changed files with 21 additions and 24 deletions

View File

@ -268,7 +268,6 @@ func startExecutionController(ctx controllerscontext.Context) (bool, error) {
ObjectWatcher: ctx.ObjectWatcher,
PredicateFunc: helper.NewExecutionPredicateOnAgent(),
InformerManager: informermanager.GetInstance(),
ClusterClientSetFunc: util.NewClusterDynamicClientSetForAgent,
RatelimiterOptions: ctx.Opts.RateLimiterOptions,
}
if err := executionController.SetupWithManager(ctx.Mgr); err != nil {

View File

@ -326,7 +326,6 @@ func startExecutionController(ctx controllerscontext.Context) (enabled bool, err
ObjectWatcher: ctx.ObjectWatcher,
PredicateFunc: helper.NewExecutionPredicate(ctx.Mgr),
InformerManager: informermanager.GetInstance(),
ClusterClientSetFunc: util.NewClusterDynamicClientSet,
RatelimiterOptions: ctx.Opts.RateLimiterOptions,
}
if err := executionController.SetupWithManager(ctx.Mgr); err != nil {

View File

@ -43,7 +43,6 @@ type Controller struct {
ObjectWatcher objectwatcher.ObjectWatcher
PredicateFunc predicate.Predicate
InformerManager informermanager.MultiClusterInformerManager
ClusterClientSetFunc func(clusterName string, client client.Client) (*util.DynamicClusterClient, error)
RatelimiterOptions ratelimiterflag.Options
}