Merge pull request #81867 from ehashman/inflight-typo

Fix typo in "EnableInfightQuotaHandler" apiserver option
This commit is contained in:
Kubernetes Prow Robot 2019-09-10 16:20:45 -07:00 committed by GitHub
commit 4ce0a300d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,9 +51,9 @@ type ServerRunOptions struct {
// decoded in a write request. 0 means no limit. // decoded in a write request. 0 means no limit.
// We intentionally did not add a flag for this option. Users of the // We intentionally did not add a flag for this option. Users of the
// apiserver library can wire it to a flag. // apiserver library can wire it to a flag.
MaxRequestBodyBytes int64 MaxRequestBodyBytes int64
TargetRAMMB int TargetRAMMB int
EnableInfightQuotaHandler bool EnableInflightQuotaHandler bool
} }
func NewServerRunOptions() *ServerRunOptions { func NewServerRunOptions() *ServerRunOptions {
@ -116,7 +116,7 @@ func (s *ServerRunOptions) Validate() []error {
errors = append(errors, fmt.Errorf("--livez-grace-period can not be a negative value")) errors = append(errors, fmt.Errorf("--livez-grace-period can not be a negative value"))
} }
if s.EnableInfightQuotaHandler { if s.EnableInflightQuotaHandler {
if !utilfeature.DefaultFeatureGate.Enabled(features.RequestManagement) { if !utilfeature.DefaultFeatureGate.Enabled(features.RequestManagement) {
errors = append(errors, fmt.Errorf("--enable-inflight-quota-handler can not be set if feature "+ errors = append(errors, fmt.Errorf("--enable-inflight-quota-handler can not be set if feature "+
"gate RequestManagement is disabled")) "gate RequestManagement is disabled"))
@ -210,7 +210,7 @@ func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet) {
"handler, which picks a randomized value above this number as the connection timeout, "+ "handler, which picks a randomized value above this number as the connection timeout, "+
"to spread out load.") "to spread out load.")
fs.BoolVar(&s.EnableInfightQuotaHandler, "enable-inflight-quota-handler", s.EnableInfightQuotaHandler, ""+ fs.BoolVar(&s.EnableInflightQuotaHandler, "enable-inflight-quota-handler", s.EnableInflightQuotaHandler, ""+
"If true, replace the max-in-flight handler with an enhanced one that queues and dispatches with priority and fairness") "If true, replace the max-in-flight handler with an enhanced one that queues and dispatches with priority and fairness")
fs.DurationVar(&s.ShutdownDelayDuration, "shutdown-delay-duration", s.ShutdownDelayDuration, ""+ fs.DurationVar(&s.ShutdownDelayDuration, "shutdown-delay-duration", s.ShutdownDelayDuration, ""+