mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Rename --enable-inflight-quota-handler to --enable-priority-and-fairness.
The old flag name doesn't make sense with the renamed API Priority and Fairness feature, and it's still safe to change the flag since it hasn't done anything useful in a released k8s version yet.
This commit is contained in:
parent
641616362d
commit
711c1e1720
@ -98,7 +98,7 @@ func TestAddFlags(t *testing.T) {
|
|||||||
"--contention-profiling=true",
|
"--contention-profiling=true",
|
||||||
"--egress-selector-config-file=/var/run/kubernetes/egress-selector/connectivity.yaml",
|
"--egress-selector-config-file=/var/run/kubernetes/egress-selector/connectivity.yaml",
|
||||||
"--enable-aggregator-routing=true",
|
"--enable-aggregator-routing=true",
|
||||||
"--enable-inflight-quota-handler=false",
|
"--enable-priority-and-fairness=false",
|
||||||
"--enable-logs-handler=false",
|
"--enable-logs-handler=false",
|
||||||
"--endpoint-reconciler-type=" + string(reconcilers.LeaseEndpointReconcilerType),
|
"--endpoint-reconciler-type=" + string(reconcilers.LeaseEndpointReconcilerType),
|
||||||
"--etcd-keyfile=/var/run/kubernetes/etcd.key",
|
"--etcd-keyfile=/var/run/kubernetes/etcd.key",
|
||||||
|
@ -552,7 +552,7 @@ func buildGenericConfig(
|
|||||||
lastErr = fmt.Errorf("failed to initialize admission: %v", err)
|
lastErr = fmt.Errorf("failed to initialize admission: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && s.GenericServerRunOptions.EnableInflightQuotaHandler {
|
if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && s.GenericServerRunOptions.EnablePriorityAndFairness {
|
||||||
genericConfig.FlowControl = BuildPriorityAndFairness(s, clientgoExternalClient, versionedInformers)
|
genericConfig.FlowControl = BuildPriorityAndFairness(s, clientgoExternalClient, versionedInformers)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ type ServerRunOptions struct {
|
|||||||
// apiserver library can wire it to a flag.
|
// apiserver library can wire it to a flag.
|
||||||
MaxRequestBodyBytes int64
|
MaxRequestBodyBytes int64
|
||||||
TargetRAMMB int
|
TargetRAMMB int
|
||||||
EnableInflightQuotaHandler bool
|
EnablePriorityAndFairness bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewServerRunOptions() *ServerRunOptions {
|
func NewServerRunOptions() *ServerRunOptions {
|
||||||
@ -64,7 +64,7 @@ func NewServerRunOptions() *ServerRunOptions {
|
|||||||
ShutdownDelayDuration: defaults.ShutdownDelayDuration,
|
ShutdownDelayDuration: defaults.ShutdownDelayDuration,
|
||||||
JSONPatchMaxCopyBytes: defaults.JSONPatchMaxCopyBytes,
|
JSONPatchMaxCopyBytes: defaults.JSONPatchMaxCopyBytes,
|
||||||
MaxRequestBodyBytes: defaults.MaxRequestBodyBytes,
|
MaxRequestBodyBytes: defaults.MaxRequestBodyBytes,
|
||||||
EnableInflightQuotaHandler: true,
|
EnablePriorityAndFairness: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,7 +193,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.EnableInflightQuotaHandler, "enable-inflight-quota-handler", s.EnableInflightQuotaHandler, ""+
|
fs.BoolVar(&s.EnablePriorityAndFairness, "enable-priority-and-fairness", s.EnablePriorityAndFairness, ""+
|
||||||
"If true and the APIPriorityAndFairness feature gate is enabled, replace the max-in-flight handler with an enhanced one that queues and dispatches with priority and fairness")
|
"If true and the APIPriorityAndFairness feature gate is enabled, 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, ""+
|
||||||
|
Loading…
Reference in New Issue
Block a user