From fbdae27f26365777224cf97be384defd18e0e787 Mon Sep 17 00:00:00 2001 From: Joyce Ma Date: Thu, 7 Dec 2023 00:39:50 +0000 Subject: [PATCH] update kdp part 2 --- pkg/controller/kccmanager/nocache/clientbuilder.go | 6 ------ pkg/controller/mocktests/harness.go | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/pkg/controller/kccmanager/nocache/clientbuilder.go b/pkg/controller/kccmanager/nocache/clientbuilder.go index c0876ab93a..e853e8e69e 100644 --- a/pkg/controller/kccmanager/nocache/clientbuilder.go +++ b/pkg/controller/kccmanager/nocache/clientbuilder.go @@ -16,15 +16,9 @@ package nocache import ( "k8s.io/client-go/rest" - "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" ) -// NoCacheClientFunc returns a client without cache. -var NoCacheClientFuncOld = func(cache cache.Cache, config *rest.Config, options client.Options, uncachedObjects ...client.Object) (client.Client, error) { - return client.New(config, options) -} - var NoCacheClientFunc = func(config *rest.Config, options client.Options) (client.Client, error) { return client.New(config, options) } diff --git a/pkg/controller/mocktests/harness.go b/pkg/controller/mocktests/harness.go index 9561c90289..52adee33c6 100644 --- a/pkg/controller/mocktests/harness.go +++ b/pkg/controller/mocktests/harness.go @@ -34,7 +34,6 @@ import ( yamlserializer "k8s.io/apimachinery/pkg/runtime/serializer/yaml" yamlutil "k8s.io/apimachinery/pkg/util/yaml" "k8s.io/client-go/rest" - "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver" ) @@ -56,7 +55,7 @@ func (h *Harness) RESTConfig() *rest.Config { return h.restConfig } -func (h *Harness) NewClient(cache cache.Cache, config *rest.Config, options client.Options, uncachedObjects ...client.Object) (client.Client, error) { +func (h *Harness) NewClient(config *rest.Config, options client.Options) (client.Client, error) { if h.Client == nil { h.Fatalf("WithObjects must be called before NewClient") }