Move periodic backoff gc to federation utils

This commit is contained in:
Marcin Wielgus
2016-10-10 16:53:15 +02:00
parent e72f26a3ff
commit 47f0e738e9
6 changed files with 43 additions and 46 deletions

View File

@@ -179,14 +179,7 @@ func (secretcontroller *SecretController) Run(stopChan <-chan struct{}) {
secretcontroller.clusterDeliverer.StartWithHandler(func(_ *util.DelayingDelivererItem) {
secretcontroller.reconcileSecretsOnClusterChange()
})
go func() {
select {
case <-time.After(time.Minute):
secretcontroller.secretBackoff.GC()
case <-stopChan:
return
}
}()
util.StartBackoffGC(secretcontroller.secretBackoff, stopChan)
}
func getSecretKey(namespace, name string) string {