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]>
(cherry picked from commit 75e4230)
(cherry picked from commit ac51abd)
  • Loading branch information
twz123 authored and github-actions[bot] committed Oct 23, 2023
1 parent cea5585 commit 9bb107f
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 9bb107f

Please sign in to comment.