From 4126dbc8ebc7b6c353cd86db2d7cbbdf4e561f67 Mon Sep 17 00:00:00 2001 From: Amber Brown Date: Mon, 5 Aug 2024 13:59:53 +1000 Subject: [PATCH] remove this func that isn't needed --- pkg/util/clienthelper/clienthelper.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pkg/util/clienthelper/clienthelper.go b/pkg/util/clienthelper/clienthelper.go index 658720fddf0..2d3e4e04364 100644 --- a/pkg/util/clienthelper/clienthelper.go +++ b/pkg/util/clienthelper/clienthelper.go @@ -25,7 +25,6 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" "k8s.io/client-go/util/retry" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" @@ -58,19 +57,6 @@ type clientHelper struct { log *logrus.Entry } -func New(log *logrus.Entry, restconfig *rest.Config) (Interface, error) { - mapper, err := apiutil.NewDynamicRESTMapper(restconfig, apiutil.WithLazyDiscovery) - if err != nil { - return nil, err - } - - client, err := client.New(restconfig, client.Options{Mapper: mapper}) - if err != nil { - return nil, err - } - return NewWithClient(log, client), nil -} - func NewWithClient(log *logrus.Entry, client client.Client) Interface { return &clientHelper{ log: log,