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

Do not generate unnecessary goroutines #76927

Merged
merged 1 commit into from
May 7, 2019
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion cmd/kube-proxy/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ func (s *ProxyServer) Run() error {

// This has to start after the calls to NewServiceConfig and NewEndpointsConfig because those
// functions must configure their shared informer event handlers first.
go informerFactory.Start(wait.NeverStop)
informerFactory.Start(wait.NeverStop)

// Birth Cry after the birth is successful
s.birthCry()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func setupQuotaController(t *testing.T, kubeClient kubernetes.Interface, lister
t.Fatal(err)
}
stop := make(chan struct{})
go informerFactory.Start(stop)
informerFactory.Start(stop)
return quotaController{qc, stop}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/volume/csi/csi_attacher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ func newTestWatchPlugin(t *testing.T, fakeClient *fakeclient.Clientset) (*csiPlu
factory := informers.NewSharedInformerFactory(fakeClient, csiResyncPeriod)
csiDriverInformer := factory.Storage().V1beta1().CSIDrivers()
csiDriverLister := csiDriverInformer.Lister()
go factory.Start(wait.NeverStop)
factory.Start(wait.NeverStop)

host := volumetest.NewFakeVolumeHostWithCSINodeName(
tmpDir,
Expand Down
2 changes: 1 addition & 1 deletion pkg/volume/csi/csi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestCSI_VolumeAll(t *testing.T) {
fakeWatcher := watch.NewRaceFreeFake()

factory := informers.NewSharedInformerFactory(client, csiResyncPeriod)
go factory.Start(wait.NeverStop)
factory.Start(wait.NeverStop)

host := volumetest.NewFakeVolumeHostWithCSINodeName(
tmpDir,
Expand Down
2 changes: 1 addition & 1 deletion pkg/volume/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ func (pm *VolumePluginMgr) Run(stopCh <-chan struct{}) {
// start informer for CSIDriver
if utilfeature.DefaultFeatureGate.Enabled(features.CSIDriverRegistry) {
informerFactory := kletHost.GetInformerFactory()
go informerFactory.Start(stopCh)
informerFactory.Start(stopCh)
}
}
}
Expand Down