Skip to content

Commit c8e2053

Browse files
committed
🏃 Remove unsed Config attribute from controller
The controller contains the unused Config attribute. Since its exported, linters will not complain about it, but since its in an internal package, it is not part of our public api.
1 parent fe0e759 commit c8e2053

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

pkg/controller/controller.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ func NewUnmanaged(name string, mgr manager.Manager, options Options) (Controller
104104
c := &controller.Controller{
105105
Do: options.Reconciler,
106106
Cache: mgr.GetCache(),
107-
Config: mgr.GetConfig(),
108107
Scheme: mgr.GetScheme(),
109108
Client: mgr.GetClient(),
110109
Recorder: mgr.GetEventRecorderFor(name),

pkg/internal/controller/controller.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"k8s.io/apimachinery/pkg/runtime"
2525
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
2626
"k8s.io/apimachinery/pkg/util/wait"
27-
"k8s.io/client-go/rest"
2827
"k8s.io/client-go/tools/record"
2928
"k8s.io/client-go/util/workqueue"
3029
"sigs.k8s.io/controller-runtime/pkg/cache"
@@ -64,10 +63,6 @@ type Controller struct {
6463
// informers are injected by the controllerManager when controllerManager.Start is called
6564
Cache cache.Cache
6665

67-
// Config is the rest.Config used to talk to the apiserver. Defaults to one of in-cluster, environment variable
68-
// specified, or the ~/.kube/Config.
69-
Config *rest.Config
70-
7166
// MakeQueue constructs the queue for this controller once the controller is ready to start.
7267
// This exists because the standard Kubernetes workqueues start themselves immediately, which
7368
// leads to goroutine leaks if something calls controller.New repeatedly.

0 commit comments

Comments
 (0)