Skip to content

Commit 1feaf74

Browse files
committed
Adjust to generic changes in controller-runtime
Signed-off-by: Stefan Büringer [email protected]
1 parent a01e278 commit 1feaf74

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

exp/addons/internal/controllers/clusterresourceset_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ func (r *ClusterResourceSetReconciler) clusterToClusterResourceSet(ctx context.C
518518
}
519519

520520
// resourceToClusterResourceSetFunc returns a typed mapper function that maps resources to ClusterResourceSet.
521-
func resourceToClusterResourceSetFunc[T client.Object](ctrlClient client.Client) handler.TypedMapFunc[T] {
521+
func resourceToClusterResourceSetFunc[T client.Object](ctrlClient client.Client) handler.TypedMapFunc[T, ctrl.Request] {
522522
return func(ctx context.Context, o T) []ctrl.Request {
523523
result := []ctrl.Request{}
524524

test/infrastructure/inmemory/pkg/runtime/cache/cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ type cache struct {
7676
garbageCollectorRequeueAfter time.Duration
7777
garbageCollectorRequeueAfterJitterFactor float64
7878
garbageCollectorConcurrency int
79-
garbageCollectorQueue workqueue.RateLimitingInterface
79+
garbageCollectorQueue workqueue.TypedRateLimitingInterface[any]
8080

8181
syncPeriod time.Duration
8282
syncConcurrency int
83-
syncQueue workqueue.RateLimitingInterface
83+
syncQueue workqueue.TypedRateLimitingInterface[any]
8484

8585
started bool
8686
}

test/infrastructure/inmemory/pkg/runtime/cache/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ func Test_cache_client(t *testing.T) {
638638
ctx, cancel := context.WithCancel(context.TODO())
639639
defer cancel()
640640

641-
c.garbageCollectorQueue = workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter())
641+
c.garbageCollectorQueue = workqueue.NewTypedRateLimitingQueue[any](workqueue.DefaultTypedControllerRateLimiter[any]())
642642
go func() {
643643
<-ctx.Done()
644644
c.garbageCollectorQueue.ShutDown()

test/infrastructure/inmemory/pkg/runtime/cache/gc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (c *cache) startGarbageCollector(ctx context.Context) error {
4141
ctx = ctrl.LoggerInto(ctx, log)
4242

4343
log.Info("Starting garbage collector queue")
44-
c.garbageCollectorQueue = workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter())
44+
c.garbageCollectorQueue = workqueue.NewTypedRateLimitingQueue[any](workqueue.DefaultTypedControllerRateLimiter[any]())
4545
go func() {
4646
<-ctx.Done()
4747
c.garbageCollectorQueue.ShutDown()

test/infrastructure/inmemory/pkg/runtime/cache/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (c *cache) startSyncer(ctx context.Context) error {
4444
ctx = ctrl.LoggerInto(ctx, log)
4545

4646
log.Info("Starting syncer queue")
47-
c.syncQueue = workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter())
47+
c.syncQueue = workqueue.NewTypedRateLimitingQueue[any](workqueue.DefaultTypedControllerRateLimiter[any]())
4848
go func() {
4949
<-ctx.Done()
5050
c.syncQueue.ShutDown()

0 commit comments

Comments
 (0)