// NewAPIServer creates a new APIServer object with default parameters
...
...
@@ -157,6 +160,8 @@ func (s *APIServer) AddFlags(fs *pflag.FlagSet) {
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.ExternalHost,"external_hostname","","The hostname to use when generating externalized URLs for this master (e.g. Swagger API Docs.)")
fs.IntVar(&s.MaxRequestsInFlight,"max_requests_inflight",20,"The maximum number of requests in flight at a given time. When the server exceeds this, it rejects requests. Zero for no limit.")
fs.StringVar(&s.LongRunningRequestRE,"long_running_request_regexp","[.*\\/watch$][^\\/proxy.*]","A regular expression matching long running requests which should be excluded from maximum inflight request handling.")
}
// TODO: Longer term we should read this from some config store, rather than a flag.