diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 678e66566..710072fd8 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -71,7 +71,6 @@ func NewController( targetCoreClient: targetCoreClient, recorder: recorder, expectations: NewUIDTrackingContExpectations(NewContExpectations()), - secretQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "secret"), nodeQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "node"), machineQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "machine"), machineSetQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "machineset"), @@ -192,14 +191,12 @@ type controller struct { machineSetLister machinelisters.MachineSetLister machineDeploymentLister machinelisters.MachineDeploymentLister // queues - secretQueue workqueue.RateLimitingInterface nodeQueue workqueue.RateLimitingInterface machineQueue workqueue.RateLimitingInterface machineSetQueue workqueue.RateLimitingInterface machineDeploymentQueue workqueue.RateLimitingInterface machineSafetyOvershootingQueue workqueue.RateLimitingInterface // syncs - secretSynced cache.InformerSynced nodeSynced cache.InformerSynced machineSynced cache.InformerSynced machineSetSynced cache.InformerSynced @@ -214,13 +211,12 @@ func (c *controller) Run(workers int, stopCh <-chan struct{}) { defer runtimeutil.HandleCrash() defer c.nodeQueue.ShutDown() - defer c.secretQueue.ShutDown() defer c.machineQueue.ShutDown() defer c.machineSetQueue.ShutDown() defer c.machineDeploymentQueue.ShutDown() defer c.machineSafetyOvershootingQueue.ShutDown() - if !cache.WaitForCacheSync(stopCh, c.secretSynced, c.nodeSynced, c.machineSynced, c.machineSetSynced, c.machineDeploymentSynced) { + if !cache.WaitForCacheSync(stopCh, c.nodeSynced, c.machineSynced, c.machineSetSynced, c.machineDeploymentSynced) { runtimeutil.HandleError(fmt.Errorf("Timed out waiting for caches to sync")) return } diff --git a/pkg/controller/controller_suite_test.go b/pkg/controller/controller_suite_test.go index af78f0f0b..0f17d012a 100644 --- a/pkg/controller/controller_suite_test.go +++ b/pkg/controller/controller_suite_test.go @@ -24,13 +24,6 @@ import ( "testing" "time" - machine_internal "github.com/gardener/machine-controller-manager/pkg/apis/machine" - "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" - faketyped "github.com/gardener/machine-controller-manager/pkg/client/clientset/versioned/typed/machine/v1alpha1/fake" - machineinformers "github.com/gardener/machine-controller-manager/pkg/client/informers/externalversions" - customfake "github.com/gardener/machine-controller-manager/pkg/fakeclient" - "github.com/gardener/machine-controller-manager/pkg/options" - "github.com/gardener/machine-controller-manager/pkg/util/provider/cache" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" @@ -44,6 +37,14 @@ import ( "k8s.io/client-go/util/workqueue" "k8s.io/klog/v2" "k8s.io/utils/pointer" + + machine_internal "github.com/gardener/machine-controller-manager/pkg/apis/machine" + "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" + faketyped "github.com/gardener/machine-controller-manager/pkg/client/clientset/versioned/typed/machine/v1alpha1/fake" + machineinformers "github.com/gardener/machine-controller-manager/pkg/client/informers/externalversions" + customfake "github.com/gardener/machine-controller-manager/pkg/fakeclient" + "github.com/gardener/machine-controller-manager/pkg/options" + "github.com/gardener/machine-controller-manager/pkg/util/provider/cache" ) func TestMachineControllerManagerSuite(t *testing.T) { @@ -473,8 +474,6 @@ func createController( nil, ) defer coreControlInformerFactory.Start(stop) - coreControlSharedInformers := coreControlInformerFactory.Core().V1() - secret := coreControlSharedInformers.Secrets() controlMachineInformerFactory := machineinformers.NewFilteredSharedInformerFactory( fakeControlMachineClient, @@ -514,8 +513,6 @@ func createController( machineSetSynced: machineSets.Informer().HasSynced, machineDeploymentSynced: machineDeployments.Informer().HasSynced, nodeSynced: nodes.Informer().HasSynced, - secretSynced: secret.Informer().HasSynced, - secretQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "secret"), nodeQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "node"), machineQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "machine"), machineSetQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "machineset"),