From b788e78932b79e1061db7c37918c5c8d28c02eb1 Mon Sep 17 00:00:00 2001 From: Tom Kennedy Date: Tue, 22 Nov 2022 13:27:12 -0500 Subject: [PATCH] Add back the NetworkErrorReconciler to our controllers --- pkg/reconciler/builder/builder.go | 6 +++++- pkg/reconciler/clusterbuilder/clusterbuilder.go | 6 +++++- pkg/reconciler/clusterstack/clusterstack.go | 6 +++++- pkg/reconciler/clusterstore/clusterstore.go | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/pkg/reconciler/builder/builder.go b/pkg/reconciler/builder/builder.go index 720260813..d16a86070 100644 --- a/pkg/reconciler/builder/builder.go +++ b/pkg/reconciler/builder/builder.go @@ -57,7 +57,11 @@ func NewController( zap.String(logkey.Kind, buildapi.BuilderCRName), ) - impl := controller.NewContext(ctx, c, controller.ControllerOptions{WorkQueueName: ReconcilerName, Logger: logger}) + impl := controller.NewContext( + ctx, + &reconciler.NetworkErrorReconciler{Reconciler: c}, + controller.ControllerOptions{WorkQueueName: ReconcilerName, Logger: logger}, + ) builderInformer.Informer().AddEventHandler(reconciler.Handler(impl.Enqueue)) c.Tracker = tracker.New(impl.EnqueueKey, opt.TrackerResyncPeriod()) diff --git a/pkg/reconciler/clusterbuilder/clusterbuilder.go b/pkg/reconciler/clusterbuilder/clusterbuilder.go index b5a610531..3d922a3d2 100644 --- a/pkg/reconciler/clusterbuilder/clusterbuilder.go +++ b/pkg/reconciler/clusterbuilder/clusterbuilder.go @@ -54,7 +54,11 @@ func NewController( zap.String(logkey.Kind, buildapi.ClusterBuilderCRName), ) - impl := controller.NewContext(ctx, c, controller.ControllerOptions{WorkQueueName: ReconcilerName, Logger: logger}) + impl := controller.NewContext( + ctx, + &reconciler.NetworkErrorReconciler{Reconciler: c}, + controller.ControllerOptions{WorkQueueName: ReconcilerName, Logger: logger}, + ) clusterBuilderInformer.Informer().AddEventHandler(reconciler.Handler(impl.Enqueue)) c.Tracker = tracker.New(impl.EnqueueKey, opt.TrackerResyncPeriod()) diff --git a/pkg/reconciler/clusterstack/clusterstack.go b/pkg/reconciler/clusterstack/clusterstack.go index 8ee23a4dc..4e9319941 100644 --- a/pkg/reconciler/clusterstack/clusterstack.go +++ b/pkg/reconciler/clusterstack/clusterstack.go @@ -48,7 +48,11 @@ func NewController( zap.String(logkey.Kind, buildapi.ClusterStackCRName), ) - impl := controller.NewContext(ctx, c, controller.ControllerOptions{WorkQueueName: ReconcilerName, Logger: logger}) + impl := controller.NewContext( + ctx, + &reconciler.NetworkErrorReconciler{Reconciler: c}, + controller.ControllerOptions{WorkQueueName: ReconcilerName, Logger: logger}, + ) clusterStackInformer.Informer().AddEventHandler(reconciler.Handler(impl.Enqueue)) return impl } diff --git a/pkg/reconciler/clusterstore/clusterstore.go b/pkg/reconciler/clusterstore/clusterstore.go index 787d6bdb7..91d75f3d6 100644 --- a/pkg/reconciler/clusterstore/clusterstore.go +++ b/pkg/reconciler/clusterstore/clusterstore.go @@ -48,7 +48,11 @@ func NewController( zap.String(logkey.Kind, buildapi.ClusterStoreCRName), ) - impl := controller.NewContext(ctx, c, controller.ControllerOptions{WorkQueueName: ReconcilerName, Logger: logger}) + impl := controller.NewContext( + ctx, + &reconciler.NetworkErrorReconciler{Reconciler: c}, + controller.ControllerOptions{WorkQueueName: ReconcilerName, Logger: logger}, + ) clusterStoreInformer.Informer().AddEventHandler(reconciler.Handler(impl.Enqueue)) return impl }