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:
Clayton Coleman
2014-08-06 16:12:19 -04:00
parent b43e3865b4
commit d7f46718a8
3 changed files with 21 additions and 20 deletions

View File

@@ -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() {