Skip to content

Commit

Permalink
Merge pull request #1076 from pivotal/reimplement-network-error-recon…
Browse files Browse the repository at this point in the history
…ciler

Add back the NetworkErrorReconciler to our controllers
  • Loading branch information
tomkennedy513 authored Nov 22, 2022
2 parents 9593d3c + b788e78 commit a4b87c8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion pkg/reconciler/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
6 changes: 5 additions & 1 deletion pkg/reconciler/clusterbuilder/clusterbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
6 changes: 5 additions & 1 deletion pkg/reconciler/clusterstack/clusterstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 5 additions & 1 deletion pkg/reconciler/clusterstore/clusterstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a4b87c8

Please sign in to comment.