Skip to content

Commit

Permalink
add comment on watches not removed
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak committed Oct 6, 2023
1 parent 4b96f35 commit 010a7b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/watchers/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ func (w *Watcher) watch(ctx context.Context, kind flowslatest.MountableType, obj
if err != nil {
return err
}
// Note that currently, watches are never removed (they can't - cf https://github.com/kubernetes-sigs/controller-runtime/issues/1884)
// This isn't a big deal here, as the number of watches that we set is very limited and not meant to grow over and over
// (unless user keeps reconfiguring cert references endlessly)
err = w.ctrl.Watch(
&source.Informer{Informer: i},
handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, o client.Object) []reconcile.Request {
Expand Down

0 comments on commit 010a7b9

Please sign in to comment.