// NewCMServer creates a new CMServer with a default config.
...
...
@@ -96,9 +100,6 @@ func NewCMServer() *CMServer {
func(s*CMServer)AddFlags(fs*pflag.FlagSet){
fs.IntVar(&s.Port,"port",s.Port,"The port that the controller-manager's http service runs on")
fs.Var(&s.Address,"address","The IP address to serve on (set to 0.0.0.0 for all interfaces)")
s.ClientConfig.QPS=20.0
s.ClientConfig.Burst=30
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.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.")
...
...
@@ -130,6 +131,8 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
fs.Var(resource.NewQuantityFlagValue(&s.NodeMemory),"node_memory","The amount of memory (in bytes) provisioned on each node")
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/")
fs.StringVar(&s.Master,"master",s.Master,"The address of the Kubernetes API server (overrides any value in kubeconfig)")
fs.StringVar(&s.Kubeconfig,"kubeconfig",s.Kubeconfig,"Path to kubeconfig file with authorization and master location information.")
}
func(s*CMServer)verifyMinionFlags(){
...
...
@@ -151,11 +154,23 @@ func (s *CMServer) verifyMinionFlags() {
// AddFlags adds flags for a specific ProxyServer to the specified FlagSet
func(s*ProxyServer)AddFlags(fs*pflag.FlagSet){
fs.Var(&s.BindAddress,"bind_address","The IP address for the proxy server to serve on (set to 0.0.0.0 for all interfaces)")
client.BindClientConfigFlags(fs,&s.ClientConfig)
fs.StringVar(&s.Master,"master",s.Master,"The address of the Kubernetes API server (overrides any value in kubeconfig)")
fs.IntVar(&s.HealthzPort,"healthz_port",s.HealthzPort,"The port to bind the health check server. Use 0 to disable.")
fs.Var(&s.HealthzBindAddress,"healthz_bind_address","The IP address for the health check server to serve on, defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)")
fs.IntVar(&s.OOMScoreAdj,"oom_score_adj",s.OOMScoreAdj,"The oom_score_adj value for kube-proxy process. Values must be within the range [-1000, 1000]")
fs.StringVar(&s.ResourceContainer,"resource_container",s.ResourceContainer,"Absolute name of the resource-only container to create and run the Kube-proxy in (Default: /kube-proxy).")
fs.StringVar(&s.Kubeconfig,"kubeconfig",s.Kubeconfig,"Path to kubeconfig file with authorization and master location information.")
}
// Run runs the specified ProxyServer. This should never exit.