mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #54209 from hzxuzhonghu/route
Automatic merge from submit-queue (batch tested with PRs 52753, 54034, 53982, 54209). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. stopCh should be passed to route-controller main goroutine **What this PR does / why we need it**: currently neverstop channel is used, stopCh should be used ``` go wait.NonSlidingUntil(func() { if err := rc.reconcileNodeRoutes(); err != nil { glog.Errorf("Couldn't reconcile node routes: %v", err) } }, syncPeriod, wait.NeverStop) ``` **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
3c46e67c14
@ -66,8 +66,8 @@ type RouteController struct {
|
||||
}
|
||||
|
||||
func New(routes cloudprovider.Routes, kubeClient clientset.Interface, nodeInformer coreinformers.NodeInformer, clusterName string, clusterCIDR *net.IPNet) *RouteController {
|
||||
if kubeClient != nil && kubeClient.Core().RESTClient().GetRateLimiter() != nil {
|
||||
metrics.RegisterMetricAndTrackRateLimiterUsage("route_controller", kubeClient.Core().RESTClient().GetRateLimiter())
|
||||
if kubeClient != nil && kubeClient.CoreV1().RESTClient().GetRateLimiter() != nil {
|
||||
metrics.RegisterMetricAndTrackRateLimiterUsage("route_controller", kubeClient.CoreV1().RESTClient().GetRateLimiter())
|
||||
}
|
||||
|
||||
if clusterCIDR == nil {
|
||||
@ -114,7 +114,7 @@ func (rc *RouteController) Run(stopCh <-chan struct{}, syncPeriod time.Duration)
|
||||
if err := rc.reconcileNodeRoutes(); err != nil {
|
||||
glog.Errorf("Couldn't reconcile node routes: %v", err)
|
||||
}
|
||||
}, syncPeriod, wait.NeverStop)
|
||||
}, syncPeriod, stopCh)
|
||||
|
||||
<-stopCh
|
||||
}
|
||||
@ -254,7 +254,7 @@ func (rc *RouteController) updateNetworkingCondition(nodeName types.NodeName, ro
|
||||
glog.Errorf("Error updating node %s: %v", nodeName, err)
|
||||
return err
|
||||
}
|
||||
glog.Errorf("Error updating node %s, retrying: %v", nodeName, err)
|
||||
glog.V(4).Infof("Error updating node %s, retrying: %v", nodeName, err)
|
||||
}
|
||||
glog.Errorf("Error updating node %s: %v", nodeName, err)
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user