Merge pull request #5248 from allenxu404/gc-freq

equip gc controller with configurable frequency
This commit is contained in:
Xun Jiang/Bruce Jiang
2022-08-30 11:12:12 +08:00
committed by GitHub
4 changed files with 21 additions and 12 deletions

View File

@@ -845,7 +845,7 @@ func (s *server) runControllers(defaultVolumeSnapshotLocations map[string]string
}
if _, ok := enabledRuntimeControllers[controller.GarbageCollection]; ok {
r := controller.NewGCReconciler(s.logger, s.mgr.GetClient())
r := controller.NewGCReconciler(s.logger, s.mgr.GetClient(), s.config.garbageCollectionFrequency)
if err := r.SetupWithManager(s.mgr); err != nil {
s.logger.Fatal(err, "unable to create controller", "controller", controller.GarbageCollection)
}