Skip to content

Commit

Permalink
Add label selector also when watching
Browse files Browse the repository at this point in the history
The watcher was not respecting its label selector when watching, only
when listing.

Fixes: a5b617d ("Improve CoreDNS affinity check in basic inttest")
Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 committed Oct 19, 2023
1 parent 345f0b2 commit 75e4230
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/kubernetes/watch/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ func (w *Watcher[T]) watch(ctx context.Context, resourceVersion string, conditio
ResourceVersion: resourceVersion,
AllowWatchBookmarks: true,
FieldSelector: w.fieldSelector,
LabelSelector: w.labelSelector,
TimeoutSeconds: pointer.Int64(maxWatchDurationSecs),
})
if err != nil {
Expand Down

0 comments on commit 75e4230

Please sign in to comment.