equip gc controller with configurable frequency

Signed-off-by: allenxu404 <qix2@vmware.com>
This commit is contained in:
allenxu404
2022-08-30 10:13:06 +08:00
parent e8494418d4
commit a8ba4875f0
4 changed files with 21 additions and 12 deletions
+1 -1
View File
@@ -836,7 +836,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)
}