mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 12:41:58 +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:
@@ -148,16 +148,12 @@ func main() {
|
||||
dockerClient,
|
||||
cadvisorClient,
|
||||
etcdClient,
|
||||
*rootDirectory)
|
||||
*rootDirectory,
|
||||
*syncFrequency)
|
||||
|
||||
// start the kubelet
|
||||
go util.Forever(func() { k.Run(cfg.Updates()) }, 0)
|
||||
|
||||
// resynchronize periodically
|
||||
// TODO: make this part of PodConfig so that it is only delivered after syncFrequency has elapsed without
|
||||
// an update
|
||||
go util.Forever(cfg.Sync, *syncFrequency)
|
||||
|
||||
// start the kubelet server
|
||||
if *enableServer {
|
||||
go util.Forever(func() {
|
||||
|
Reference in New Issue
Block a user