mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 14:11:14 +00:00
Kubelet should have a max think time before auto resync
The sync frequency should be part of the syncLoop and resync no less often than every X seconds. The current implementation runs even if a config update was delivered less than X seconds ago.
This commit is contained in:
@@ -115,7 +115,6 @@ func startComponents(manifestURL string) (apiServerURL string) {
|
||||
config.NewSourceURL(manifestURL, 5*time.Second, cfg1.Channel("url"))
|
||||
myKubelet := kubelet.NewIntegrationTestKubelet(machineList[0], &fakeDocker1)
|
||||
go util.Forever(func() { myKubelet.Run(cfg1.Updates()) }, 0)
|
||||
go util.Forever(cfg1.Sync, 3*time.Second)
|
||||
go util.Forever(func() {
|
||||
kubelet.ListenAndServeKubeletServer(myKubelet, cfg1.Channel("http"), http.DefaultServeMux, "localhost", 10250)
|
||||
}, 0)
|
||||
@@ -127,7 +126,6 @@ func startComponents(manifestURL string) (apiServerURL string) {
|
||||
config.NewSourceEtcd(config.EtcdKeyForHost(machineList[1]), etcdClient, 30*time.Second, cfg2.Channel("etcd"))
|
||||
otherKubelet := kubelet.NewIntegrationTestKubelet(machineList[1], &fakeDocker2)
|
||||
go util.Forever(func() { otherKubelet.Run(cfg2.Updates()) }, 0)
|
||||
go util.Forever(cfg2.Sync, 3*time.Second)
|
||||
go util.Forever(func() {
|
||||
kubelet.ListenAndServeKubeletServer(otherKubelet, cfg2.Channel("http"), http.DefaultServeMux, "localhost", 10251)
|
||||
}, 0)
|
||||
|
Reference in New Issue
Block a user