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

Revert #16840 and #16902 in 1.1 release (used for debugging watch issues) #17004

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions plugin/pkg/scheduler/factory/factory.go
Expand Up @@ -178,24 +178,24 @@ func (f *ConfigFactory) CreateFromKeys(predicateKeys, priorityKeys sets.String)
}

// Watch and queue pods that need scheduling.
cache.NewReflector(f.createUnassignedPodLW(), &api.Pod{}, f.PodQueue, time.Minute).RunUntil(f.StopEverything)
cache.NewReflector(f.createUnassignedPodLW(), &api.Pod{}, f.PodQueue, 0).RunUntil(f.StopEverything)

// Begin populating scheduled pods.
go f.scheduledPodPopulator.Run(f.StopEverything)

// Watch nodes.
// Nodes may be listed frequently, so provide a local up-to-date cache.
cache.NewVerboseReflector("schedulerNodes", f.createNodeLW(), &api.Node{}, f.NodeLister.Store, time.Minute).RunUntil(f.StopEverything)
cache.NewReflector(f.createNodeLW(), &api.Node{}, f.NodeLister.Store, 0).RunUntil(f.StopEverything)

// Watch and cache all service objects. Scheduler needs to find all pods
// created by the same services or ReplicationControllers, so that it can spread them correctly.
// Cache this locally.
cache.NewReflector(f.createServiceLW(), &api.Service{}, f.ServiceLister.Store, time.Minute).RunUntil(f.StopEverything)
cache.NewReflector(f.createServiceLW(), &api.Service{}, f.ServiceLister.Store, 0).RunUntil(f.StopEverything)

// Watch and cache all ReplicationController objects. Scheduler needs to find all pods
// created by the same services or ReplicationControllers, so that it can spread them correctly.
// Cache this locally.
cache.NewReflector(f.createControllerLW(), &api.ReplicationController{}, f.ControllerLister.Store, time.Minute).RunUntil(f.StopEverything)
cache.NewReflector(f.createControllerLW(), &api.ReplicationController{}, f.ControllerLister.Store, 0).RunUntil(f.StopEverything)

r := rand.New(rand.NewSource(time.Now().UnixNano()))

Expand Down