Skip to content

Commit ab1e7d7

Browse files
Apply unique controller name to each registration of status controller (#75)
1 parent 53716ab commit ab1e7d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

status/controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package status
33
import (
44
"context"
55
"fmt"
6+
"reflect"
7+
"strings"
68
"sync"
79
"time"
810

@@ -52,7 +54,7 @@ func (c *Controller[T]) Register(_ context.Context, m manager.Manager) error {
5254
return controllerruntime.NewControllerManagedBy(m).
5355
For(object.New[T]()).
5456
WithOptions(controller.Options{MaxConcurrentReconciles: 10}).
55-
Named("status").
57+
Named(fmt.Sprintf("operatorpkg.%s.status", strings.ToLower(reflect.TypeOf(object.New[T]()).Elem().Name()))).
5658
Complete(c)
5759
}
5860

0 commit comments

Comments
 (0)