Commit Graph

71 Commits

Author SHA1 Message Date
Paco Xu
f73bba51c9 flowcontrol: set the serialization version to v1 2023-12-25 14:24:50 +08:00
Abu Kashem
b8cd792b36
rename the roundtrip annotation, forbid it in v1 2023-10-30 18:22:51 -04:00
Abu Kashem
730d10a8fb
apiserver: add generated files for flowcontrol api change 2023-10-30 08:18:41 -04:00
Abu Kashem
9fd2ab419a
apiserver: allow zero value for the 'nominalConcurrencyShares' field 2023-10-30 08:18:40 -04:00
Abu Kashem
430c226709
apiserver: fix lint issue, defaulting and validation test for flowcontrol v1 2023-10-30 08:18:40 -04:00
Abu Kashem
17bda3c3e0
apiserver: apf controller, bootstrap, tests should use flowcontrol v1 API 2023-10-30 08:18:35 -04:00
Abu Kashem
5972037ffd
apiserver: generate code for apf flowcontrol v1 API
run:
- hack/update-codegen.sh
- hack/update-openapi-spec.sh
2023-10-30 07:48:22 -04:00
Abu Kashem
03a9ad200d
apiserver: remove copied generated files
otherwsie we see the following error from code-gen
  Unrecognized package: k8s.io/api/flowcontrol/v1
2023-10-30 07:48:22 -04:00
Abu Kashem
b24dd44904
apiserver: enable apf v1 API 2023-10-30 07:48:22 -04:00
Abu Kashem
5cb03064d9
apiserver: update copy, rename v1beta3 to v1 2023-10-30 07:48:22 -04:00
Abu Kashem
dc72308093
apiserver: copy apf v1beta3 to v1 2023-10-30 07:48:21 -04:00
SataQiu
2825519da2 apf: remove v1alpha1 API 2023-08-30 20:48:42 +08:00
Mike Spreitzer
ce90eb2cc2 Fix validation to use field.Forbidden instead of Required
Co-authored-by: David Eads <deads2k@users.noreply.github.com>
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2023-07-14 01:02:28 +00:00
Abu Kashem
3754d2da20 apf: allow admin to change the Exempt field only of the exempt pl
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2023-07-14 01:01:29 +00:00
Abu Kashem
f8e4e8abac apf: add validation to exempt for borrowing
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2023-07-14 01:01:09 +00:00
Mike Spreitzer
f78d6062eb Update generated code for APF borrowing by exempt
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2023-07-14 01:00:06 +00:00
Mike Spreitzer
a9d8cace1f Fix AutoUpdateAnnotationKey, NominalConcurrencyShares
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2023-07-14 00:47:58 +00:00
Abu Kashem
3d3240c8b4 apf: add API changes for borrowing by exempt pl 2023-07-14 00:47:28 +00:00
Tim Hockin
d55b67b349
Clean up brace whitespace in **/validation_test.go
This was making my eyes bleed as I read over code.

I used the following in vim.  I made them up on the fly, but they seemed
to pass manual inspection.

:g/},\n\s*{$/s//}, {/
:w
:g/{$\n\s*{$/s//{{/
:w
:g/^\(\s*\)},\n\1},$/s//}},/
:w
:g/^\(\s*\)},$\n\1}$/s//}}/
:w
2023-05-02 00:48:42 -07:00
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