Skip to content

Commit 711c1e1

Browse files
author
Jonathan Tomer
committed
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.
1 parent 6416163 commit 711c1e1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

cmd/kube-apiserver/app/options/options_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func TestAddFlags(t *testing.T) {
9898
"--contention-profiling=true",
9999
"--egress-selector-config-file=/var/run/kubernetes/egress-selector/connectivity.yaml",
100100
"--enable-aggregator-routing=true",
101-
"--enable-inflight-quota-handler=false",
101+
"--enable-priority-and-fairness=false",
102102
"--enable-logs-handler=false",
103103
"--endpoint-reconciler-type=" + string(reconcilers.LeaseEndpointReconcilerType),
104104
"--etcd-keyfile=/var/run/kubernetes/etcd.key",

cmd/kube-apiserver/app/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ func buildGenericConfig(
552552
lastErr = fmt.Errorf("failed to initialize admission: %v", err)
553553
}
554554

555-
if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && s.GenericServerRunOptions.EnableInflightQuotaHandler {
555+
if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && s.GenericServerRunOptions.EnablePriorityAndFairness {
556556
genericConfig.FlowControl = BuildPriorityAndFairness(s, clientgoExternalClient, versionedInformers)
557557
}
558558

staging/src/k8s.io/apiserver/pkg/server/options/server_run_options.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ type ServerRunOptions struct {
4848
// decoded in a write request. 0 means no limit.
4949
// We intentionally did not add a flag for this option. Users of the
5050
// apiserver library can wire it to a flag.
51-
MaxRequestBodyBytes int64
52-
TargetRAMMB int
53-
EnableInflightQuotaHandler bool
51+
MaxRequestBodyBytes int64
52+
TargetRAMMB int
53+
EnablePriorityAndFairness bool
5454
}
5555

5656
func NewServerRunOptions() *ServerRunOptions {
@@ -64,7 +64,7 @@ func NewServerRunOptions() *ServerRunOptions {
6464
ShutdownDelayDuration: defaults.ShutdownDelayDuration,
6565
JSONPatchMaxCopyBytes: defaults.JSONPatchMaxCopyBytes,
6666
MaxRequestBodyBytes: defaults.MaxRequestBodyBytes,
67-
EnableInflightQuotaHandler: true,
67+
EnablePriorityAndFairness: true,
6868
}
6969
}
7070

@@ -193,7 +193,7 @@ func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet) {
193193
"handler, which picks a randomized value above this number as the connection timeout, "+
194194
"to spread out load.")
195195

196-
fs.BoolVar(&s.EnableInflightQuotaHandler, "enable-inflight-quota-handler", s.EnableInflightQuotaHandler, ""+
196+
fs.BoolVar(&s.EnablePriorityAndFairness, "enable-priority-and-fairness", s.EnablePriorityAndFairness, ""+
197197
"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")
198198

199199
fs.DurationVar(&s.ShutdownDelayDuration, "shutdown-delay-duration", s.ShutdownDelayDuration, ""+

0 commit comments

Comments
 (0)