garbagecollector: add initialSyncTimeout for Run

Signed-off-by: haorenfsa <haorenfsa@gmail.com>
This commit is contained in:
haorenfsa
2024-09-13 23:03:47 +08:00
parent d4fdfaf17d
commit 87ca404634
5 changed files with 13 additions and 9 deletions

View File

@@ -219,7 +219,7 @@ func CreateGCController(ctx context.Context, tb ktesting.TB, restConfig restclie
go wait.Until(func() {
restMapper.Reset()
}, syncPeriod, ctx.Done())
go gc.Run(ctx, 1)
go gc.Run(ctx, 1, syncPeriod)
go gc.Sync(ctx, clientSet.Discovery(), syncPeriod)
}
return startGC