Merge pull request #13076 from invenfantasy/master
Cleanup deprecated Forever function
This commit is contained in:
@@ -53,11 +53,11 @@ func New(client *client.Client, expClient client.ExperimentalInterface) *Horizon
|
||||
}
|
||||
|
||||
func (a *HorizontalPodAutoscalerController) Run(syncPeriod time.Duration) {
|
||||
go util.Forever(func() {
|
||||
go util.Until(func() {
|
||||
if err := a.reconcileAutoscalers(); err != nil {
|
||||
glog.Errorf("Couldn't reconcile horizontal pod autoscalers: %v", err)
|
||||
}
|
||||
}, syncPeriod)
|
||||
}, syncPeriod, util.NeverStop)
|
||||
}
|
||||
|
||||
func (a *HorizontalPodAutoscalerController) reconcileAutoscalers() error {
|
||||
|
@@ -138,15 +138,15 @@ func NewNodeController(
|
||||
// Run starts an asynchronous loop that monitors the status of cluster nodes.
|
||||
func (nc *NodeController) Run(period time.Duration) {
|
||||
// Incorporate the results of node status pushed from kubelet to master.
|
||||
go util.Forever(func() {
|
||||
go util.Until(func() {
|
||||
if err := nc.monitorNodeStatus(); err != nil {
|
||||
glog.Errorf("Error monitoring node status: %v", err)
|
||||
}
|
||||
}, nc.nodeMonitorPeriod)
|
||||
}, nc.nodeMonitorPeriod, util.NeverStop)
|
||||
|
||||
go util.Forever(func() {
|
||||
go util.Until(func() {
|
||||
nc.podEvictor.TryEvict(func(nodeName string) { nc.deletePods(nodeName) })
|
||||
}, nodeEvictionPeriod)
|
||||
}, nodeEvictionPeriod, util.NeverStop)
|
||||
}
|
||||
|
||||
// We observed a Node deletion in etcd. Currently we only need to remove Pods that
|
||||
|
@@ -52,7 +52,7 @@ func NewResourceQuotaController(kubeClient client.Interface) *ResourceQuotaContr
|
||||
// Run begins watching and syncing.
|
||||
func (rm *ResourceQuotaController) Run(period time.Duration) {
|
||||
rm.syncTime = time.Tick(period)
|
||||
go util.Forever(func() { rm.synchronize() }, period)
|
||||
go util.Until(func() { rm.synchronize() }, period, util.NeverStop)
|
||||
}
|
||||
|
||||
func (rm *ResourceQuotaController) synchronize() {
|
||||
|
@@ -47,11 +47,11 @@ func New(routes cloudprovider.Routes, kubeClient client.Interface, clusterName s
|
||||
}
|
||||
|
||||
func (rc *RouteController) Run(syncPeriod time.Duration) {
|
||||
go util.Forever(func() {
|
||||
go util.Until(func() {
|
||||
if err := rc.reconcileNodeRoutes(); err != nil {
|
||||
glog.Errorf("Couldn't reconcile node routes: %v", err)
|
||||
}
|
||||
}, syncPeriod)
|
||||
}, syncPeriod, util.NeverStop)
|
||||
}
|
||||
|
||||
func (rc *RouteController) reconcileNodeRoutes() error {
|
||||
|
Reference in New Issue
Block a user