Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Shane Utt <[email protected]>
Signed-off-by: Kobi Levi <[email protected]>
  • Loading branch information
levikobi and shaneutt authored Aug 18, 2023
1 parent 8d65029 commit 61a2eda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion controllers/dataplane_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewDataplaneReconciler(client client.Client, schema *runtime.Scheme, manage
Client: client,
Scheme: schema,
BackendsClientManager: manager,
updates: make(chan event.GenericEvent, 1000),
updates: make(chan event.GenericEvent, 1),
}
}

Expand Down Expand Up @@ -85,6 +85,7 @@ func (r *DataplaneReconciler) SetupWithManager(mgr ctrl.Manager) error {
func (r *DataplaneReconciler) daemonsetHasMatchingAnnotations(obj client.Object) bool {
daemonset, ok := obj.(*appsv1.DaemonSet)
if !ok {
log.Error("received unexpected type in daemonset watch predicates: %T", obj)
return false
}

Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func main() {
clientsManager, err := client.NewBackendsClientManager(cfg)
if err != nil {
setupLog.Error(err, "unable to create backends client manager")
os.Exit(1)
}
defer clientsManager.Close()

Expand Down Expand Up @@ -144,7 +145,7 @@ func main() {
}

// Tee consumes the received channel and mirrors the messages into 2 new channels.
func Tee[T any](ctx context.Context, in <-chan T) (_, _ <-chan T) {
func tee[T any](ctx context.Context, in <-chan T) (_, _ <-chan T) {
out1, out2 := make(chan T), make(chan T)

OrDone := func(ctx context.Context, in <-chan T) <-chan T {
Expand Down

0 comments on commit 61a2eda

Please sign in to comment.