Skip to content

Commit

Permalink
Move cluster.NewClientFunc to client.NewClientFunc. Adapt NewClientFu…
Browse files Browse the repository at this point in the history
  • Loading branch information
ary1992 committed Jun 23, 2023
1 parent 6c6f4ac commit 8e5fb75
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/gardener-resource-manager/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import (
"k8s.io/component-base/version/verflag"
"k8s.io/klog/v2"
"k8s.io/utils/pointer"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
"sigs.k8s.io/controller-runtime/pkg/cluster"
Expand Down Expand Up @@ -216,7 +215,7 @@ func run(ctx context.Context, log logr.Logger, cfg *config.ResourceManagerConfig
opts.SyncPeriod = &cfg.TargetClientConnection.CacheResyncPeriod.Duration

if *cfg.TargetClientConnection.DisableCachedClient {
opts.NewClient = func(_ cache.Cache, config *rest.Config, opts client.Options, _ ...client.Object) (client.Client, error) {
opts.NewClient = func(config *rest.Config, opts client.Options) (client.Client, error) {
return client.New(config, opts)
}
}
Expand Down

0 comments on commit 8e5fb75

Please sign in to comment.