// NewAPIServer creates a new APIServer object with default parameters
// NewAPIServer creates a new APIServer object with default parameters
...
@@ -201,6 +203,8 @@ func (s *APIServer) AddFlags(fs *pflag.FlagSet) {
...
@@ -201,6 +203,8 @@ func (s *APIServer) AddFlags(fs *pflag.FlagSet) {
fs.IntVar(&s.MaxRequestsInFlight,"max-requests-inflight",400,"The maximum number of requests in flight at a given time. When the server exceeds this, it rejects requests. Zero for no limit.")
fs.IntVar(&s.MaxRequestsInFlight,"max-requests-inflight",400,"The maximum number of requests in flight at a given time. When the server exceeds this, it rejects requests. Zero for no limit.")
fs.IntVar(&s.MinRequestTimeout,"min-request-timeout",1800,"An optional field indicating the minimum number of seconds a handler must keep a request open before timing it out. Currently only honored by the watch request handler, which picks a randomized value above this number as the connection timeout, to spread out load.")
fs.IntVar(&s.MinRequestTimeout,"min-request-timeout",1800,"An optional field indicating the minimum number of seconds a handler must keep a request open before timing it out. Currently only honored by the watch request handler, which picks a randomized value above this number as the connection timeout, to spread out load.")
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.")
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.")
fs.StringVar(&s.SSHUser,"ssh-user","","If non-empty, use secure SSH proxy to the nodes, using this user name")
fs.StringVar(&s.SSHKeyfile,"ssh-keyfile","","If non-empty, use secure SSH proxy to the nodes, using this user keyfile")
}
}
// TODO: Longer term we should read this from some config store, rather than a flag.
// TODO: Longer term we should read this from some config store, rather than a flag.