Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[branch/v7] Remove refetching from resourceWatcher (#14262) #14307

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

rosstimothy
Copy link
Contributor

Backport

This will backport the following commits from master to branch/v7:

Questions ?

Please refer to the Backport tool documentation

The resourceWatcher is meant to be a long lived way for a component
to receive events about a particular resource from an upstream cache.
However, there was a refetching mechanism that would cause a healthy
and subscribed watcher to be closed, the resourceWatcher to fetch all
the resource types it is watching from the upstream cache and to create a
new watcher **every 10 minutes**. This causes unneeded load on
the upstream cache and also eats up network bandwidth.

This removes the refetching behavior entirely to ensure watchers
aren't unnecessarily closed. The change should be transparent to
users of the resourceWatcher, but should noticeably reduce both
the number of init events being emitted through out a cluster
and the number of cache reads.

Fixes #14234

(cherry picked from commit dea633f)

# Conflicts:
#	lib/services/watcher.go
@rosstimothy rosstimothy merged commit 6aa943a into branch/v7 Jul 12, 2022
@zmb3 zmb3 deleted the backport/branch/v7/pr-14262 branch September 9, 2022 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants