Updating target pools on cloud nodes change.

Implemented updating target pools for external services on chage of cloud nodes. Related to #5241.
This commit is contained in:
Jerzy Szczepkowski
2015-04-01 14:52:28 +02:00
parent 2e24c50c1c
commit eb253a694e
9 changed files with 204 additions and 29 deletions

View File

@@ -70,6 +70,7 @@ type CMServer struct {
NodeMemory resource.Quantity
KubeletConfig client.KubeletConfig
ClusterName string
EnableProfiling bool
}
@@ -91,6 +92,7 @@ func NewCMServer() *CMServer {
EnableHttps: true,
HTTPTimeout: time.Duration(5) * time.Second,
},
ClusterName: "kubernetes",
}
return &s
}
@@ -132,7 +134,8 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
fs.Int64Var(&s.NodeMilliCPU, "node_milli_cpu", s.NodeMilliCPU, "The amount of MilliCPU provisioned on each node")
fs.Var(resource.NewQuantityFlagValue(&s.NodeMemory), "node_memory", "The amount of memory (in bytes) provisioned on each node")
client.BindKubeletClientConfigFlags(fs, &s.KubeletConfig)
fs.BoolVar(&s.EnableProfiling, "profiling", true, "Enable profiling via web interface host:port/debug/pprof/")
fs.StringVar(&s.ClusterName, "cluster_name", s.ClusterName, "The instance prefix for the cluster")
fs.BoolVar(&s.EnableProfiling, "profiling", false, "Enable profiling via web interface host:port/debug/pprof/")
}
func (s *CMServer) verifyMinionFlags() {
@@ -198,7 +201,7 @@ func (s *CMServer) Run(_ []string) error {
nodeController := nodeControllerPkg.NewNodeController(cloud, s.MinionRegexp, s.MachineList, nodeResources,
kubeClient, kubeletClient, s.RegisterRetryCount, s.PodEvictionTimeout, util.NewTokenBucketRateLimiter(s.DeletingPodsQps, s.DeletingPodsBurst),
s.NodeMonitorGracePeriod, s.NodeStartupGracePeriod, s.NodeMonitorPeriod)
s.NodeMonitorGracePeriod, s.NodeStartupGracePeriod, s.NodeMonitorPeriod, s.ClusterName )
nodeController.Run(s.NodeSyncPeriod, s.SyncNodeList)
resourceQuotaManager := resourcequota.NewResourceQuotaManager(kubeClient)