Skip to content

Commit

Permalink
remove this func that isn't needed
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl committed Aug 14, 2024
1 parent 03c893c commit 4126dbc
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions pkg/util/clienthelper/clienthelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4126dbc

Please sign in to comment.