diff --git a/cmd/agent/console.go b/cmd/agent/console.go index c5e13e54..f60a54af 100644 --- a/cmd/agent/console.go +++ b/cmd/agent/console.go @@ -45,27 +45,27 @@ func registerConsoleReconcilersOrDie( k8sClient ctrclient.Client, consoleClient client.Client, ) { - mgr.AddReconcilerOrDie(service.Identifier, func() (controller.Reconciler, workqueue.RateLimitingInterface, error) { + mgr.AddReconcilerOrDie(service.Identifier, func() (controller.Reconciler, workqueue.TypedRateLimitingInterface[string], error) { r, err := service.NewServiceReconciler(consoleClient, config, args.ControllerCacheTTL(), args.ManifestCacheTTL(), args.RestoreNamespace(), args.ConsoleUrl()) return r, r.SvcQueue, err }) - mgr.AddReconcilerOrDie(pipelinegates.Identifier, func() (controller.Reconciler, workqueue.RateLimitingInterface, error) { + mgr.AddReconcilerOrDie(pipelinegates.Identifier, func() (controller.Reconciler, workqueue.TypedRateLimitingInterface[string], error) { r, err := pipelinegates.NewGateReconciler(consoleClient, k8sClient, config, args.ControllerCacheTTL(), args.PollInterval(), args.ClusterId()) return r, r.GateQueue, err }) - mgr.AddReconcilerOrDie(restore.Identifier, func() (controller.Reconciler, workqueue.RateLimitingInterface, error) { + mgr.AddReconcilerOrDie(restore.Identifier, func() (controller.Reconciler, workqueue.TypedRateLimitingInterface[string], error) { r := restore.NewRestoreReconciler(consoleClient, k8sClient, args.ControllerCacheTTL(), args.RestoreNamespace()) return r, r.RestoreQueue, nil }) - mgr.AddReconcilerOrDie(namespaces.Identifier, func() (controller.Reconciler, workqueue.RateLimitingInterface, error) { + mgr.AddReconcilerOrDie(namespaces.Identifier, func() (controller.Reconciler, workqueue.TypedRateLimitingInterface[string], error) { r := namespaces.NewNamespaceReconciler(consoleClient, k8sClient, args.ControllerCacheTTL()) return r, r.NamespaceQueue, nil }) - mgr.AddReconcilerOrDie(stacks.Identifier, func() (controller.Reconciler, workqueue.RateLimitingInterface, error) { + mgr.AddReconcilerOrDie(stacks.Identifier, func() (controller.Reconciler, workqueue.TypedRateLimitingInterface[string], error) { namespace, err := utils.GetOperatorNamespace() if err != nil { setupLog.Errorw("unable to get operator namespace", "error", err) diff --git a/cmd/agent/main.go b/cmd/agent/main.go index 1aa145f2..09db47d5 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -14,7 +14,6 @@ import ( deploymentsv1alpha1 "github.com/pluralsh/deployment-operator/api/v1alpha1" "github.com/pluralsh/deployment-operator/cmd/agent/args" "github.com/pluralsh/deployment-operator/pkg/cache" - _ "github.com/pluralsh/deployment-operator/pkg/cache" // Init cache. "github.com/pluralsh/deployment-operator/pkg/client" consolectrl "github.com/pluralsh/deployment-operator/pkg/controller" "github.com/pluralsh/deployment-operator/pkg/log" diff --git a/pkg/controller/controller_manager.go b/pkg/controller/controller_manager.go index 50c58cb2..8b187880 100644 --- a/pkg/controller/controller_manager.go +++ b/pkg/controller/controller_manager.go @@ -75,7 +75,7 @@ func (cm *ControllerManager) GetReconciler(name string) Reconciler { return nil } -func (cm *ControllerManager) AddReconcilerOrDie(name string, reconcilerGetter func() (Reconciler, workqueue.RateLimitingInterface, error)) { +func (cm *ControllerManager) AddReconcilerOrDie(name string, reconcilerGetter func() (Reconciler, workqueue.TypedRateLimitingInterface[string], error)) { reconciler, queue, err := reconcilerGetter() if err != nil { log.Logger.Errorw("unable to create reconciler", "name", name, "error", err)