@@ -150,9 +150,6 @@ type configController struct {
150
150
// from server configuration.
151
151
serverConcurrencyLimit int
152
152
153
- // requestWaitLimit comes from server configuration.
154
- requestWaitLimit time.Duration
155
-
156
153
// watchTracker implements the necessary WatchTracker interface.
157
154
WatchTracker
158
155
@@ -287,13 +284,12 @@ func newTestableController(config TestableConfig) *configController {
287
284
asFieldManager : config .AsFieldManager ,
288
285
foundToDangling : config .FoundToDangling ,
289
286
serverConcurrencyLimit : config .ServerConcurrencyLimit ,
290
- requestWaitLimit : config .RequestWaitLimit ,
291
287
flowcontrolClient : config .FlowcontrolClient ,
292
288
priorityLevelStates : make (map [string ]* priorityLevelState ),
293
289
WatchTracker : NewWatchTracker (),
294
290
MaxSeatsTracker : NewMaxSeatsTracker (),
295
291
}
296
- klog .V (2 ).Infof ("NewTestableController %q with serverConcurrencyLimit=%d, requestWaitLimit=%s, name=%s, asFieldManager=%q" , cfgCtlr .name , cfgCtlr .serverConcurrencyLimit , cfgCtlr . requestWaitLimit , cfgCtlr .name , cfgCtlr .asFieldManager )
292
+ klog .V (2 ).Infof ("NewTestableController %q with serverConcurrencyLimit=%d, name=%s, asFieldManager=%q" , cfgCtlr .name , cfgCtlr .serverConcurrencyLimit , cfgCtlr .name , cfgCtlr .asFieldManager )
297
293
// Start with longish delay because conflicts will be between
298
294
// different processes, so take some time to go away.
299
295
cfgCtlr .configQueue = workqueue .NewNamedRateLimitingQueue (workqueue .NewItemExponentialFailureRateLimiter (200 * time .Millisecond , 8 * time .Hour ), "priority_and_fairness_config_queue" )
@@ -433,7 +429,7 @@ func (cfgCtlr *configController) updateBorrowingLocked(setCompleters bool, plSta
433
429
plState := plStates [plName ]
434
430
if setCompleters {
435
431
qsCompleter , err := queueSetCompleterForPL (cfgCtlr .queueSetFactory , plState .queues ,
436
- plState .pl , cfgCtlr . requestWaitLimit , plState .reqsGaugePair , plState .execSeatsObs ,
432
+ plState .pl , plState .reqsGaugePair , plState .execSeatsObs ,
437
433
metrics .NewUnionGauge (plState .seatDemandIntegrator , plState .seatDemandRatioedGauge ))
438
434
if err != nil {
439
435
klog .ErrorS (err , "Inconceivable! Configuration error in existing priority level" , "pl" , plState .pl )
@@ -657,10 +653,10 @@ func (cfgCtlr *configController) lockAndDigestConfigObjects(newPLs []*flowcontro
657
653
658
654
// Supply missing mandatory PriorityLevelConfiguration objects
659
655
if ! meal .haveExemptPL {
660
- meal .imaginePL (fcboot .MandatoryPriorityLevelConfigurationExempt , cfgCtlr . requestWaitLimit )
656
+ meal .imaginePL (fcboot .MandatoryPriorityLevelConfigurationExempt )
661
657
}
662
658
if ! meal .haveCatchAllPL {
663
- meal .imaginePL (fcboot .MandatoryPriorityLevelConfigurationCatchAll , cfgCtlr . requestWaitLimit )
659
+ meal .imaginePL (fcboot .MandatoryPriorityLevelConfigurationCatchAll )
664
660
}
665
661
666
662
meal .finishQueueSetReconfigsLocked ()
@@ -692,7 +688,7 @@ func (meal *cfgMeal) digestNewPLsLocked(newPLs []*flowcontrol.PriorityLevelConfi
692
688
}
693
689
}
694
690
qsCompleter , err := queueSetCompleterForPL (meal .cfgCtlr .queueSetFactory , state .queues ,
695
- pl , meal . cfgCtlr . requestWaitLimit , state .reqsGaugePair , state .execSeatsObs ,
691
+ pl , state .reqsGaugePair , state .execSeatsObs ,
696
692
metrics .NewUnionGauge (state .seatDemandIntegrator , state .seatDemandRatioedGauge ))
697
693
if err != nil {
698
694
klog .Warningf ("Ignoring PriorityLevelConfiguration object %s because its spec (%s) is broken: %s" , pl .Name , fcfmt .Fmt (pl .Spec ), err )
@@ -798,7 +794,7 @@ func (meal *cfgMeal) processOldPLsLocked() {
798
794
}
799
795
var err error
800
796
plState .qsCompleter , err = queueSetCompleterForPL (meal .cfgCtlr .queueSetFactory , plState .queues ,
801
- plState .pl , meal . cfgCtlr . requestWaitLimit , plState .reqsGaugePair , plState .execSeatsObs ,
797
+ plState .pl , plState .reqsGaugePair , plState .execSeatsObs ,
802
798
metrics .NewUnionGauge (plState .seatDemandIntegrator , plState .seatDemandRatioedGauge ))
803
799
if err != nil {
804
800
// This can not happen because queueSetCompleterForPL already approved this config
@@ -880,7 +876,7 @@ func (meal *cfgMeal) finishQueueSetReconfigsLocked() {
880
876
// queueSetCompleterForPL returns an appropriate QueueSetCompleter for the
881
877
// given priority level configuration. Returns nil and an error if the given
882
878
// object is malformed in a way that is a problem for this package.
883
- func queueSetCompleterForPL (qsf fq.QueueSetFactory , queues fq.QueueSet , pl * flowcontrol.PriorityLevelConfiguration , requestWaitLimit time. Duration , reqsIntPair metrics.RatioedGaugePair , execSeatsObs metrics.RatioedGauge , seatDemandGauge metrics.Gauge ) (fq.QueueSetCompleter , error ) {
879
+ func queueSetCompleterForPL (qsf fq.QueueSetFactory , queues fq.QueueSet , pl * flowcontrol.PriorityLevelConfiguration , reqsIntPair metrics.RatioedGaugePair , execSeatsObs metrics.RatioedGauge , seatDemandGauge metrics.Gauge ) (fq.QueueSetCompleter , error ) {
884
880
if (pl .Spec .Type == flowcontrol .PriorityLevelEnablementLimited ) != (pl .Spec .Limited != nil ) {
885
881
return nil , errors .New ("broken union structure at the top, for Limited" )
886
882
}
@@ -902,7 +898,6 @@ func queueSetCompleterForPL(qsf fq.QueueSetFactory, queues fq.QueueSet, pl *flow
902
898
DesiredNumQueues : int (qcAPI .Queues ),
903
899
QueueLengthLimit : int (qcAPI .QueueLengthLimit ),
904
900
HandSize : int (qcAPI .HandSize ),
905
- RequestWaitLimit : requestWaitLimit ,
906
901
}
907
902
}
908
903
} else {
@@ -956,16 +951,15 @@ func (meal *cfgMeal) presyncFlowSchemaStatus(fs *flowcontrol.FlowSchema, isDangl
956
951
957
952
// imaginePL adds a priority level based on one of the mandatory ones
958
953
// that does not actually exist (right now) as a real API object.
959
- func (meal * cfgMeal ) imaginePL (proto * flowcontrol.PriorityLevelConfiguration , requestWaitLimit time. Duration ) {
954
+ func (meal * cfgMeal ) imaginePL (proto * flowcontrol.PriorityLevelConfiguration ) {
960
955
klog .V (3 ).Infof ("No %s PriorityLevelConfiguration found, imagining one" , proto .Name )
961
956
labelValues := []string {proto .Name }
962
957
reqsGaugePair := metrics .RatioedGaugeVecPhasedElementPair (meal .cfgCtlr .reqsGaugeVec , 1 , 1 , labelValues )
963
958
execSeatsObs := meal .cfgCtlr .execSeatsGaugeVec .NewForLabelValuesSafe (0 , 1 , labelValues )
964
959
seatDemandIntegrator := fq .NewNamedIntegrator (meal .cfgCtlr .clock , proto .Name )
965
960
seatDemandRatioedGauge := metrics .ApiserverSeatDemands .NewForLabelValuesSafe (0 , 1 , []string {proto .Name })
966
- qsCompleter , err := queueSetCompleterForPL (meal .cfgCtlr .queueSetFactory , nil , proto ,
967
- requestWaitLimit , reqsGaugePair , execSeatsObs ,
968
- metrics .NewUnionGauge (seatDemandIntegrator , seatDemandRatioedGauge ))
961
+ qsCompleter , err := queueSetCompleterForPL (meal .cfgCtlr .queueSetFactory , nil , proto , reqsGaugePair ,
962
+ execSeatsObs , metrics .NewUnionGauge (seatDemandIntegrator , seatDemandRatioedGauge ))
969
963
if err != nil {
970
964
// This can not happen because proto is one of the mandatory
971
965
// objects and these are not erroneous
0 commit comments