Commit Graph

52 Commits

Author SHA1 Message Date
SataQiu
950c147db5 apiserver: update serialization version priority for flowcontrol API 2023-01-13 22:19:39 +08:00
Mike Spreitzer
feb4227788 apiserver: finish implementation of borrowing in APF
Also make some design changes exposed in testing and review.

Do not remove the ambiguous old metric
`apiserver_flowcontrol_request_concurrency_limit` because reviewers
though it is too early.  This creates a problem, that metric can not
keep both of its old meanings.  I chose the configured concurrency
limit.

Testing has revealed a design flaw, which concerns the initialization
of the seat demand state tracking.  The current design in the KEP is
as follows.

> Adjustment is also done on configuration change … For a newly
> introduced priority level, we set HighSeatDemand, AvgSeatDemand, and
> SmoothSeatDemand to NominalCL-LendableSD/2 and StDevSeatDemand to
> zero.

But this does not work out well at server startup.  As part of its
construction, the APF controller does a configuration change with zero
objects read, to initialize its request-handling state.  As always,
the two mandatory priority levels are implicitly added whenever they
are not read.  So this initial reconfig has one non-exempt priority
level, the mandatory one called catch-all --- and it gets its
SmoothSeatDemand initialized to the whole server concurrency limit.
From there it decays slowly, as per the regular design.  So for a
fairly long time, it appears to have a high demand and competes
strongly with the other priority levels.  Its Target is higher than
all the others, once they start to show up.  It properly gets a low
NominalCL once other levels show up, which actually makes it compete
harder for borrowing: it has an exceptionally high Target and a rather
low NominalCL.

I have considered the following fix.  The idea is that the designed
initialization is not appropriate before all the default objects are
read.  So the fix is to have a mode bit in the controller.  In the
initial state, those seat demand tracking variables are set to zero.
Once the config-producing controller detects that all the default
objects are pre-existing, it flips the mode bit.  In the later mode,
the seat demand tracking variables are initialized as originally
designed.

However, that still gives preferential treatment to the default
PriorityLevelConfiguration objects, over any that may be added later.

So I have made a universal and simpler fix: always initialize those
seat demand tracking variables to zero.  Even if a lot of load shows
up quickly, remember that adjustments are frequent (every 10 sec) and
the very next one will fully respond to that load.

Also: revise logging logic, to log at numerically lower V level when
there is a change.

Also: bug fix in float64close.

Also, separate imports in some file

Co-authored-by: Han Kang <hankang@google.com>
2022-11-08 21:51:44 -08:00
Abu Kashem
424b23bb15 apiserver: fix defaulting for apf bootstrap configuration 2022-11-08 13:23:09 -08:00
Abu Kashem
c5520d6ba2 apiserver: validate borrowing for flowcontrol API 2022-11-08 13:23:07 -08:00
Abu Kashem
ca949d5188 apiserver: set borrowing defaults for flowcontrol API 2022-11-08 13:22:59 -08:00
Abu Kashem
a76223f8da apiserver: add generated files for borrowing in flowcontrol 2022-11-08 13:16:44 -08:00
Abu Kashem
a7e84a4537 apiserver: add fields for borrowing in apf flowcontrol 2022-11-08 13:16:44 -08:00
Abu Kashem
66fc0d7037
rename assuredConcurrencyShares for flowcontrol v1beta3 2022-09-26 15:34:10 -04:00
Abu Kashem
f4f363fbe4
add patch annotations to flowcontrol v1beta3 2022-09-21 18:54:21 -04:00
Abu Kashem
0a99e6ebb1
apiserver: update apf logic to use v1beta3 2022-09-21 18:54:20 -04:00
Abu Kashem
e1a764d635
apiserver: enable v1beta3 for apf 2022-09-21 18:54:19 -04:00
Abu Kashem
dfcd9d905f
apiserver: apf rename copy to v1beta3 2022-09-21 18:54:19 -04:00
Abu Kashem
0e7827dc05
apiserver: copy apf v1beta2 to v1beta3 2022-09-21 18:54:19 -04:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Kubernetes Prow Robot
6d0913fb4d
Merge pull request #99329 from chymy/linkcheck-404
Fix link 404
2022-01-04 11:26:39 -08:00
Abu Kashem
28f2b42a41
apf: update apf logic to use v1beta2 2021-09-09 08:28:58 -04:00
Abu Kashem
2f19f8c2df
apf: regenerate for v1beta2 2021-09-09 08:28:58 -04:00
Abu Kashem
e2b8701545
apf: ebable v1beta2 2021-09-09 08:28:53 -04:00
Abu Kashem
5d0bf053b6
apf: rename to v1beta2 2021-09-07 09:42:13 -04:00
Abu Kashem
54064ff337
apf: copy v1beta1 to v1beta2 2021-09-07 09:42:12 -04:00
Kubernetes Prow Robot
eb729620c5
Merge pull request #99682 from chymy/fix-misspelling
Fix misspelling and misgrammar
2021-09-05 12:46:28 -07:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Jordan Liggitt
87a4e082ac Change defaulter-gen input to package path 2021-08-14 11:00:18 -04:00
Mike Spreitzer
179e48c4be Add missing comments in APF API types 2021-06-25 00:27:40 -04:00
chymy
b250a985d2 Fix misspelling and misgrammar
Signed-off-by: chymy <chang.min1@zte.com.cn>
2021-06-05 05:02:17 -04:00
chymy
5a0fc32a47 Fix link 404
Signed-off-by: chymy <chang.min1@zte.com.cn>
2021-05-12 11:48:48 -04:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Adhityaa Chandrasekar
642b114830 flowcontrol bootstrap: give catch-all PL more concurrency share
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>
2020-11-13 23:20:42 +00:00
yue9944882
849be447f5 APF: graduate API and types to beta
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>
2020-11-13 23:20:39 +00:00
wojtekt
a19f528351 Remove FieldMatchingFlags 2020-10-29 18:25:51 +01:00
Matthew Fenwick
d407129cf7 modify DNS-1123 error messages to indicate that RFC 1123 is not followed exactly 2020-09-02 08:04:04 -04:00
Jordan Liggitt
d879965808 Clean up list items listType 2020-03-31 23:08:08 -04:00
Taesun Lee
b873cbbed5 Fix: pkg/apis Typos in comments, function name, error message
poicy -> policy
varialbes -> variables
exeuction -> execution
Resaurces -> Resources
TestSetDefaulEndpointsProtocol -> TestSetDefaultEndpointsProtocol
TestSetDefaulServiceTargetPort -> TestSetDefaultServiceTargetPort
TestSetDefaulServiceExternalTraffic -> TestSetDefaultServiceExternalTraffic
2020-02-24 00:11:00 +09:00
Mike Spreitzer
a8e0747043 Updated API Priority and Fairness validation to track change in catch-all priority level 2020-01-24 14:05:43 -05:00
Mike Spreitzer
47ad6db1dc Fixup comments in internalbootstrap 2020-01-17 22:16:50 -05:00
Mike Spreitzer
4d88acee51 Made internalbootstrap gin up its own Scheme
doing our part to reduce usage of legacyscheme.Scheme
2020-01-17 16:47:40 -05:00
Mike Spreitzer
5330bd7440 dogged insistence on full verbosity 2020-01-17 15:46:36 -05:00
Mike Spreitzer
ec5321c6a9 Update validation for API Priority and Fairness
This PR fixes oversights and adds validation that rejects writes
of wrong Spec values for the four mandatory objects.
2020-01-17 02:43:52 -05:00
yue9944882
70dea6e4a8 review: several fixes and addressing comments 2020-01-11 01:46:31 +08:00
yue9944882
141909fa2e tighten ceiling for matching-precedence to 10000 2019-12-25 15:47:11 +08:00
MikeSpreitzer
1c60949dfd updated generated files 2019-11-14 00:53:02 -05:00
Mike Spreitzer
bb69b93b20 applied gofmt 2019-11-14 00:53:02 -05:00
Mike Spreitzer
a912bd8488 Identify cluster scope by a boolean field rather than a special namespace 2019-11-14 00:53:02 -05:00
Mike Spreitzer
3b77bc8054 Enabled discrimination on target namespace
Generalized ResourcePolicyRule in API Priority and Fairness to be able
to discriminate on the target namespace (if any) specified in the
request.
2019-11-14 00:53:02 -05:00
Mike Spreitzer
f9bc2bcf62 Refactored PriorityLevelConfiguration
.. so that concurrency limitation can be done without queuing
(like the existing max-in-flight filter does).
2019-11-13 16:05:52 +00:00
yue9944882
bbd2e6b48b typo list-type s/associative/map/ 2019-11-08 14:27:14 +08:00
yue9944882
3d1b5d0e9a flowcontrol rest storage implementation 2019-11-08 14:27:14 +08:00
yue9944882
da612a365d validates non-resoruce-url 2019-11-06 21:58:20 +08:00
yue9944882
6db3edff10 [generated] ./hack/update-all.sh
generated

generated

generated

rule

generated

generated
2019-10-29 12:59:17 +08:00
yue9944882
c2d081eaf9 adding validation
validation test

validation test

validation

adding validation for fs/pl status

validation

validation

validation

replace < with <=

validation test
2019-10-29 12:59:16 +08:00