mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #39394 from wlan0/master
Automatic merge from submit-queue (batch tested with PRs 39394, 38270, 39473, 39516, 36243) make private method private @thockin
This commit is contained in:
commit
73d36ce587
@ -70,8 +70,8 @@ the cloud specific control loops shipped with Kubernetes.`,
|
|||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResyncPeriod computes the time interval a shared informer waits before resyncing with the api server
|
// resyncPeriod computes the time interval a shared informer waits before resyncing with the api server
|
||||||
func ResyncPeriod(s *options.CloudControllerManagerServer) func() time.Duration {
|
func resyncPeriod(s *options.CloudControllerManagerServer) func() time.Duration {
|
||||||
return func() time.Duration {
|
return func() time.Duration {
|
||||||
factor := rand.Float64() + 1
|
factor := rand.Float64() + 1
|
||||||
return time.Duration(float64(s.MinResyncPeriod.Nanoseconds()) * factor)
|
return time.Duration(float64(s.MinResyncPeriod.Nanoseconds()) * factor)
|
||||||
@ -191,7 +191,7 @@ func StartControllers(s *options.CloudControllerManagerServer, kubeconfig *restc
|
|||||||
client := func(serviceAccountName string) clientset.Interface {
|
client := func(serviceAccountName string) clientset.Interface {
|
||||||
return rootClientBuilder.ClientOrDie(serviceAccountName)
|
return rootClientBuilder.ClientOrDie(serviceAccountName)
|
||||||
}
|
}
|
||||||
sharedInformers := informers.NewSharedInformerFactory(client("shared-informers"), nil, ResyncPeriod(s)())
|
sharedInformers := informers.NewSharedInformerFactory(client("shared-informers"), nil, resyncPeriod(s)())
|
||||||
|
|
||||||
_, clusterCIDR, err := net.ParseCIDR(s.ClusterCIDR)
|
_, clusterCIDR, err := net.ParseCIDR(s.ClusterCIDR)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user