Merge pull request #1144 from pescox/pr/worker-goroutine-leak

fix rbd-woker helmapp goroutine leak
This commit is contained in:
yangkaa 2022-02-16 20:34:00 -06:00 committed by GitHub
commit af1fc40e6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,6 +99,8 @@ func NewApp(ctx context.Context, kubeClient clientset.Interface, rainbondClient
func createRecorder(kubeClient clientset.Interface, name, namespace string) record.EventRecorder {
eventBroadcaster := record.NewBroadcaster()
defer eventBroadcaster.Shutdown()
eventBroadcaster.StartLogging(logrus.Infof)
eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{