Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node sync period flag #3659

Merged
merged 1 commit into from
Jan 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions cmd/kube-controller-manager/controller-manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ var (
cloudProvider = flag.String("cloud_provider", "", "The provider for cloud services. Empty string for no provider.")
cloudConfigFile = flag.String("cloud_config", "", "The path to the cloud provider configuration file. Empty string for no configuration file.")
minionRegexp = flag.String("minion_regexp", "", "If non empty, and -cloud_provider is specified, a regular expression for matching minion VMs.")
machineList util.StringList
nodeSyncPeriod = flag.Duration("node_sync_period", 10*time.Second, ""+
"The period for syncing nodes from cloudprovider. Longer periods will result in "+
"fewer calls to cloud provider, but may delay addition of new nodes to cluster.")
machineList util.StringList
// TODO: Discover these by pinging the host machines, and rip out these flags.
// TODO: in the meantime, use resource.QuantityFlag() instead of these
nodeMilliCPU = flag.Int64("node_milli_cpu", 1000, "The amount of MilliCPU provisioned on each node")
Expand Down Expand Up @@ -107,7 +110,7 @@ func main() {
},
}
nodeController := nodeControllerPkg.NewNodeController(cloud, *minionRegexp, machineList, nodeResources, kubeClient)
nodeController.Run(10 * time.Second)
nodeController.Run(*nodeSyncPeriod)

select {}
}
5 changes: 4 additions & 1 deletion docs/man/kube-controller-manager.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ The kube-controller-manager has several options.
log to standard error instead of files.

**--machines**=[]
List of machines to schedule onto, comma separated.
List of machines to schedule onto, comma separated.

**--master**=""
The address of the Kubernetes API server.

**--node_sync_peroid**=10s
The period for syncing nodes from cloudprovider.

**--port**=10252
The port that the controller-manager's http service runs on.

Expand Down
3 changes: 2 additions & 1 deletion docs/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ objects. It performs two major functions: cluster-wide node synchronization
and single node life-cycle management.

Node controller has a sync loop that creates/deletes `Node`s from Kubernetes
based on all matching VM instances listed from cloud provider. If a new instance
based on all matching VM instances listed from cloud provider. The sync period
can be controlled via flag "--node_sync_period". If a new instance
gets created, Node Controller creates a representation for it. If an existing
instance gets deleted, Node Controller deletes the representation. Note however,
Node Controller is unable to provision the node for you, i.e. it won't install
Expand Down