cleanup controllerruntime deprecated option SyncPeriod Namespace
Signed-off-by: huangyanfeng <huangyanfeng1992@gmail.com>
This commit is contained in:
parent
0865183292
commit
22e4f4bb8c
|
@ -196,8 +196,7 @@ func run(ctx context.Context, opts *options.Options) error {
|
|||
|
||||
controllerManager, err := controllerruntime.NewManager(controlPlaneRestConfig, controllerruntime.Options{
|
||||
Scheme: gclient.NewSchema(),
|
||||
SyncPeriod: &opts.ResyncPeriod.Duration,
|
||||
Namespace: executionSpace,
|
||||
Cache: cache.Options{SyncPeriod: &opts.ResyncPeriod.Duration, Namespaces: []string{executionSpace}},
|
||||
LeaderElection: opts.LeaderElection.LeaderElect,
|
||||
LeaderElectionID: fmt.Sprintf("karmada-agent-%s", opts.ClusterName),
|
||||
LeaderElectionNamespace: opts.LeaderElection.ResourceNamespace,
|
||||
|
|
|
@ -145,7 +145,7 @@ func Run(ctx context.Context, opts *options.Options) error {
|
|||
controllerManager, err := controllerruntime.NewManager(controlPlaneRestConfig, controllerruntime.Options{
|
||||
Logger: klog.Background(),
|
||||
Scheme: gclient.NewSchema(),
|
||||
SyncPeriod: &opts.ResyncPeriod.Duration,
|
||||
Cache: cache.Options{SyncPeriod: &opts.ResyncPeriod.Duration},
|
||||
LeaderElection: opts.LeaderElection.LeaderElect,
|
||||
LeaderElectionID: opts.LeaderElection.ResourceName,
|
||||
LeaderElectionNamespace: opts.LeaderElection.ResourceNamespace,
|
||||
|
|
Loading…
Reference in New Issue