// TODO: Discover these by pinging the host machines, and rip out these params.
// TODO: Discover these by pinging the host machines, and rip out these params.
NodeMilliCPUint64
NodeMilliCPUint64
...
@@ -72,6 +73,7 @@ func NewCMServer() *CMServer {
...
@@ -72,6 +73,7 @@ func NewCMServer() *CMServer {
RegisterRetryCount:10,
RegisterRetryCount:10,
NodeMilliCPU:1000,
NodeMilliCPU:1000,
NodeMemory:resource.MustParse("3Gi"),
NodeMemory:resource.MustParse("3Gi"),
SyncNodeList:true,
KubeletConfig:client.KubeletConfig{
KubeletConfig:client.KubeletConfig{
Port:ports.KubeletPort,
Port:ports.KubeletPort,
EnableHttps:false,
EnableHttps:false,
...
@@ -103,7 +105,7 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
...
@@ -103,7 +105,7 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
client.BindClientConfigFlags(fs,&s.ClientConfig)
client.BindClientConfigFlags(fs,&s.ClientConfig)
fs.StringVar(&s.CloudProvider,"cloud_provider",s.CloudProvider,"The provider for cloud services. Empty string for no provider.")
fs.StringVar(&s.CloudProvider,"cloud_provider",s.CloudProvider,"The provider for cloud services. Empty string for no provider.")
fs.StringVar(&s.CloudConfigFile,"cloud_config",s.CloudConfigFile,"The path to the cloud provider configuration file. Empty string for no configuration file.")
fs.StringVar(&s.CloudConfigFile,"cloud_config",s.CloudConfigFile,"The path to the cloud provider configuration file. Empty string for no configuration file.")
fs.StringVar(&s.MinionRegexp,"minion_regexp",s.MinionRegexp,"If non empty, and -cloud_provider is specified, a regular expression for matching minion VMs.")
fs.StringVar(&s.MinionRegexp,"minion_regexp",s.MinionRegexp,"If non empty, and --cloud_provider is specified, a regular expression for matching minion VMs.")
"The number of retries for initial node registration. Retry interval equals node_sync_period.")
"The number of retries for initial node registration. Retry interval equals node_sync_period.")
fs.Var(&s.MachineList,"machines","List of machines to schedule onto, comma separated.")
fs.Var(&s.MachineList,"machines","List of machines to schedule onto, comma separated.")
fs.BoolVar(&s.SyncNodeList,"sync_nodes",s.SyncNodeList,"If true, and --cloud_provider is specified, sync nodes from the cloud provider. Default true.")
// TODO: Discover these by pinging the host machines, and rip out these flags.
// TODO: Discover these by pinging the host machines, and rip out these flags.
// TODO: in the meantime, use resource.QuantityFlag() instead of these
// TODO: in the meantime, use resource.QuantityFlag() instead of these
fs.Int64Var(&s.NodeMilliCPU,"node_milli_cpu",s.NodeMilliCPU,"The amount of MilliCPU provisioned on each node")
fs.Int64Var(&s.NodeMilliCPU,"node_milli_cpu",s.NodeMilliCPU,"The amount of MilliCPU provisioned on each node")
...
@@ -119,6 +122,9 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
...
@@ -119,6 +122,9 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
}
}
func(s*CMServer)verifyMinionFlags(){
func(s*CMServer)verifyMinionFlags(){
if!s.SyncNodeList&&s.MinionRegexp!=""{
glog.Info("--minion_regexp is ignored by --sync_nodes=false")