Commit Graph

570 Commits

Author SHA1 Message Date
Andrew Sy Kim
38d884580b test/integration/apiserver/cel: add tests for match resources and match policy
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-11-14 21:48:12 -05:00
Andrew Sy Kim
894063908f test/integration/apiserver/cel: add additional test cases to Test_ValidateNamespace_NoParams for unguarded params
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-11-14 11:03:52 -05:00
Andrew Sy Kim
e2ce260f7a test/integration/apiserver/cel: add Test_ValidatingAdmissionPolicy_UpdateParamRef
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-11-14 11:03:52 -05:00
Andrew Sy Kim
cbcc22eb9c test/integration/apiserver/cel: add Test_ValidatingAdmissionPolicy_UpdateParamKind
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-11-14 11:03:52 -05:00
Andrew Sy Kim
3d30b97cd8 test/integration/apiserver/cel: add Test_PolicyExemption
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-11-14 11:03:52 -05:00
Kubernetes Prow Robot
d1c0171aed
Merge pull request #111023 from pohly/dynamic-resource-allocation
dynamic resource allocation
2022-11-11 16:21:56 -08:00
Kubernetes Prow Robot
263ba476ba
Merge pull request #113764 from Jefftree/foobar
Fix bugs with aggregated discovery
2022-11-11 13:11:56 -08:00
Alexander Zielenski
93caf125b9 add discovery integration tests
add crd integration tests
\
2022-11-11 11:19:31 -08:00
Patrick Ohly
5cca60f0b8 api: dynamic resource allocation API
This adds a new resource.k8s.io API group with v1alpha1 as version. It contains
four new types: resource.ResourceClaim, resource.ResourceClass, resource.ResourceClaimTemplate, and
resource.PodScheduling.
2022-11-10 20:08:24 +01:00
Kubernetes Prow Robot
77b027936a
Merge pull request #113803 from dashpole/revert-113693-apiserver_tracing_beta
Revert "Graduate API Server tracing to beta"
2022-11-09 23:36:53 -08:00
Cici Huang
2973712486 Rename FG to ValidatingAdmissionPolicy 2022-11-10 03:37:35 +00:00
David Ashpole
e799fcdadd
Revert "Graduate API Server tracing to beta" 2022-11-09 22:37:28 -05:00
Kubernetes Prow Robot
b2c72feca8
Merge pull request #113693 from dashpole/apiserver_tracing_beta
Graduate API Server tracing to beta
2022-11-09 04:54:13 -08:00
Kubernetes Prow Robot
1193a9abcb
Merge pull request #113485 from MikeSpreitzer/apf-borrowing
Add borrowing between priority levels in APF
2022-11-09 01:40:12 -08:00
Kubernetes Prow Robot
8058e8eff8
Merge pull request #113171 from Jefftree/aggregated-discovery-generic
Aggregated discovery server changes
2022-11-09 00:08:12 -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
Alexander Zielenski
91d0d48326 add aggregated discovery integration tests
Co-authored-by: Jeffrey Ying <jeffrey.ying86@live.com>
2022-11-08 14:44:50 -08:00
David Ashpole
4be473c774
promote TracingConfiguration to v1beta1 2022-11-08 22:44:07 +00:00
David Ashpole
fc3cec6bf3
graduate API Server tracing to beta 2022-11-08 22:44:07 +00:00
Kubernetes Prow Robot
595ea32411
Merge pull request #113314 from cici37/celIntegration
CEL validation in Admission chain
2022-11-07 17:08:33 -08:00
Kubernetes Prow Robot
0e9a2e6bcf
Merge pull request #113669 from wojtek-t/clean_shutdown_final
Clean shutdown final
2022-11-07 16:01:45 -08:00
Cici Huang
e7d83a1fb7 Integrate cel admission with API.
Co-authored-by: Alexander Zielenski <zielenski@google.com>
Co-authored-by: Joe Betz <jpbetz@google.com>
2022-11-07 21:38:55 +00:00
Cici Huang
d86cfa9854 Add integration test.
Co-authored-by: Kermit Alexander II <kermitalexandr@google.com>
2022-11-07 21:35:58 +00:00
David Ashpole
ffae39dbde
additional integration test validations for apiserver tracing 2022-11-07 19:18:46 +00:00
Wojciech Tyczyński
71d87272de Clean shutdown of apply integration tests 2022-11-07 09:14:15 +01:00
David Ashpole
f830d971b8
fix and extend apiserver tracing tests 2022-10-31 19:42:14 +00:00
David Ashpole
00bcd6cf01
Fix bug in which APIServerTracing did not work with some egress selectors 2022-10-18 19:41:07 +00:00
Kubernetes Prow Robot
a6bee7d5fc
Merge pull request #112575 from tkashem/apf-fix-reset-fields-test
apf: don't omit flowschemas from reset fields test
2022-10-03 13:20:13 -07:00
Kubernetes Prow Robot
9720af2ba3
Merge pull request #112306 from tkashem/v1beta3
add v1beta3 for Priority And Fairness
2022-10-03 10:06:14 -07:00
Wojciech Tyczyński
57c95fbfa1 Lock ServerSideApply feature to true 2022-09-27 13:48:28 +02:00
Abu Kashem
66fc0d7037
rename assuredConcurrencyShares for flowcontrol v1beta3 2022-09-26 15:34:10 -04:00
Abu Kashem
6edc251686
apiserver: update apf tests 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
Kubernetes Prow Robot
6820a383be
Merge pull request #112545 from dims/update-etcd-3.5.5-and-all-otel-related-to-latest
Update etcd 3.5.5 and all otel related libraries to newer versions
2022-09-19 19:15:31 -07:00
Abu Kashem
aa04af3f5c
apf: don't omit flowschemas from reset fields test 2022-09-19 13:46:38 -04:00
Jordan Liggitt
9cfc128b8e
Simplify P&F concurrency test 2022-09-19 08:26:29 -04:00
Davanum Srinivas
a1635fa702
fix how we look for our request
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-09-18 17:21:19 -04:00
Davanum Srinivas
3eaca7cf51
update code to use newer otel api
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-09-17 21:48:20 -04:00
m.nabokikh
00dfba473b Add auth API to get self subject attributes
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2022-09-14 18:00:26 +02:00
Mike Spreitzer
d3081b378a Revise according to review 2022-08-29 23:02:29 -04:00
Mike Spreitzer
98acbc3692 Make TestApplyResetFields exhibit surprising object 2022-08-26 14:13:35 -04:00
Kubernetes Prow Robot
00191af94b
Merge pull request #111885 from p0lyn0mial/apiserver-integration-rsp-body
integration: TestCacheControl and TestHSTS close the ResponseBody
2022-08-25 05:14:07 -07:00
Kubernetes Prow Robot
22cb7ac766
Merge pull request #111912 from aojea/crd_recursion_regression_test
regression test for exponential recursion bug on CRDs
2022-08-23 20:09:08 -07:00
Kubernetes Prow Robot
068743f937
Merge pull request #111148 from cyang49/master
APF concurrency isolation integration test
2022-08-23 16:05:02 -07:00
Antonio Ojea
8d7264fb8e regression test for exponential recursion bug on CRDs 2022-08-19 09:43:17 +02:00
Lukasz Szaszkiewicz
be2c707a4c integration: TestCacheControl and TestHSTS close the ResponseBody 2022-08-17 13:29:01 +02:00
Chih-Chieh Yang
94097457fd Minor fixes 2022-08-09 12:19:00 +00:00
Alexander Zielenski
bd648f3f9e
add regression test of formerly atomic claimRef 2022-08-03 10:57:13 -07:00
Chih-Chieh Yang
3c31efe32f Add more comment and clip negative value to prevent Sqrt error 2022-08-03 15:16:26 +00:00
Chih-Chieh Yang
c70ec593ec Fix minor issues and clean up 2022-08-03 14:14:36 +00:00
Chih-Chieh Yang
07e2bfe1cc Refactor and clean up the code 2022-08-02 14:29:03 +00:00
Sally O'Malley
47e7d8034f
kubelet tracing
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Co-authored-by: David Ashpole <dashpole@google.com>
2022-08-01 12:55:02 -04:00
Kubernetes Prow Robot
cf2800b812
Merge pull request #111402 from verb/111030-ec-ga
Promote EphemeralContainers feature to GA
2022-07-29 19:29:20 -07:00
Chih-Chieh Yang
ed74de833d Add comment for the reason this test is needed 2022-07-30 00:13:48 +00:00
Kubernetes Prow Robot
3ffdfbe286
Merge pull request #111254 from dims/update-to-golang-1.19-rc2
[golang] Update to 1.19rc2 (from 1.18.3)
2022-07-26 14:25:09 -07:00
Kubernetes Prow Robot
8bc12f24e6
Merge pull request #106388 from alexzielenski/ssa-ignore-nonsemantic-changes
Ignore non-semantic changes to objects
2022-07-26 11:35:10 -07: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
Lee Verberne
d238e67ba6 Remove EphemeralContainers feature-gate checks 2022-07-26 02:55:30 +02:00
Wojciech Tyczyński
5b042f0bf4 Remove RunAnAPIServer from integration tests 2022-07-25 17:52:31 +02:00
Kubernetes Prow Robot
0cde1b7446
Merge pull request #111242 from wojtek-t/fix_leaking_goroutines_11
Fix leaking goroutines in multiple integration tests
2022-07-19 05:34:30 -07:00
Kubernetes Prow Robot
eeb12bb3af
Merge pull request #110178 from kevindelgado/validation-beta-1-25
Graduate server side validation to beta
2022-07-19 05:34:06 -07:00
Wojciech Tyczyński
e9e494e14a Clean shutdown of apiserver integration tests 2022-07-19 10:03:51 +02:00
Kevin Delgado
d983fd8078 Add server-side metadata unknown field validation 2022-07-18 14:55:12 +00:00
Chih-Chieh Yang
4fc7fd25bf Fix the apf metrics names 2022-07-15 18:27:29 +00:00
Chih-Chieh Yang
b0c211a1e5 Fix PL seat util metric retrieval 2022-07-15 17:11:16 +00:00
Chih-Chieh Yang
f298d506e8 APF concurrency isolation integration test (#1)
* Add APF concurrency utilization test
2022-07-15 17:11:16 +00:00
Alexander Zielenski
40343793f7
benchmark and metrics for new timestamp transformer comparison
add proper metrics

rename & improve documentation for path metric dimension
2022-07-14 11:56:36 -07:00
Alexander Zielenski
7233538008
revert timestamp updates to object if non-managed fields do not change
add short-circuiting logic for long comaprison

replace timestamps rather than doing a full managed fields deepcopy

add guard
2022-07-14 11:55:26 -07:00
Abirdcfly
00b9ead02c cleanup: remove duplicate import
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-14 11:25:19 +08:00
Kermit Alexander
40da208b3d Add runtime cost limit test. 2022-07-07 10:08:55 +00:00
Abirdcfly
fba297629d fix: --chunk-size with selector returns missing result
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-06-23 07:07:13 +08:00
Wojciech Tyczyński
6b59525746 Clean shutdown of flowcontrol integration tests 2022-06-15 16:53:42 +02:00
Wojciech Tyczyński
57242e3cbb Clean shutdown of openapi integration tests 2022-06-15 16:40:54 +02:00
Kubernetes Prow Robot
8e541911b8
Merge pull request #110574 from SataQiu/test-speed-20220614
Using t.Run() in integration test TestApplyAlsoCreates
2022-06-14 12:07:45 -07:00
Kubernetes Prow Robot
5503bb0570
Merge pull request #110529 from wojtek-t/fix_leaking_goroutines_7
Fix leaking goroutines in multiple integration tests
2022-06-14 09:09:54 -07:00
SataQiu
20f8a06e50 using t.Run() in integration test TestApplyAlsoCreates 2022-06-15 00:01:10 +08:00
Wojciech Tyczyński
3930362ad4 Clean(er) shutdown of apiserver integration tests 2022-06-14 13:55:31 +02:00
Kubernetes Prow Robot
c0642b749e
Merge pull request #110179 from Jefftree/fix_openapi_v2
Prune defaults for CRDs for OpenAPI V2
2022-06-13 13:28:12 -07:00
Mike Spreitzer
1f1cfba2a3 Remove the PairVec types 2022-06-12 23:37:15 -04:00
Jefftree
e2cbf9759b Add test to check for _v2 2022-06-08 21:33:07 +00:00
Wojciech Tyczyński
3b61f4ac20 Clean shutdown of apply integration tests 2022-05-28 21:14:09 +02:00
Wojciech Tyczyński
6f706775bc Clean shutdown of test apiserver 2022-05-26 10:42:48 +02:00
Mike Spreitzer
7d64a93a14 Give apf metrics abstractions more familiar names
The logic is similar to Prometheus gauges and vectors,
adopt that terminology.
2022-05-23 16:09:43 -04:00
Kubernetes Prow Robot
22a21f974f
Merge pull request #110063 from wojtek-t/cleanup_testing_namespaces_in_integration
Simplify Create/Delete-TestingNamespace functions
2022-05-16 01:50:18 -07:00
Wojciech Tyczyński
deef9e40de Simplify Create/Delete-TestingNamespace functions 2022-05-15 23:06:26 +02:00
Kubernetes Prow Robot
bbdcce6a9e
Merge pull request #109880 from Jefftree/patch-4
Remove warning log for crd merging
2022-05-13 15:31:54 -07:00
Jefftree
fad5353ef8 Integration test for openapi scale & status 2022-05-13 11:45:31 -07:00
Wojciech Tyczyński
492e7111a0 Minor cleanup of apply tests 2022-05-13 11:37:22 +02:00
Wojciech Tyczyński
89549142c0 Stop leaking apiserver in tracing test 2022-05-13 09:47:24 +02:00
Kubernetes Prow Robot
e8ef77514b
Merge pull request #109443 from kevindelgado/dynamic-apply
Add Apply and ApplyStatus methods to dynamic ResourceInterface
2022-05-04 01:27:53 -07:00
Wojciech Tyczyński
73da6d15f9 Fix TestPriorityLevelIsolation concurrency issue 2022-04-19 15:59:14 +02:00
Kevin Delgado
581ac7f446 Add Apply and ApplyStatus methods to dynamic ResourceInterface 2022-04-12 21:55:40 +00:00
Jefftree
67d3dbfaae Separate OpenAPI V2 and V3 Config 2022-03-29 17:49:56 -07:00
Ricardo Katz
42a1201082
Implementation on Network Policy Status (#107963)
* Implement status subresource in NetworkPolicy

* add NetworkPolicyStatus generated files

* Fix comments in netpol status review
2022-03-29 01:52:48 -07:00
Joe Betz
ff3d67d76a Enfoce per-CRD estimated cost limit 2022-03-28 17:33:16 -04:00
Kermit Alexander
7e66bd2057 Add per-CRD cost evaluation. 2022-03-28 16:08:13 +00:00
Antonio Ojea
d2ca66651d refactor apiserver tests 2022-03-26 10:20:27 +01:00
Kubernetes Prow Robot
6c73b674d7
Merge pull request #109030 from liggitt/revert-apf-ssa
Revert "Revert "Merge pull request #107797 from tkashem/revert-107456""
2022-03-25 19:17:58 -07:00
Jordan Liggitt
363a8beaab Revert "Revert "Merge pull request 107797 from tkashem/revert-107456""
This reverts commit b0b460921b.
2022-03-25 14:36:10 -04:00
cici37
460121fa1e Return a placeholder error for blocking failure before CEL validation. 2022-03-25 01:19:31 -07:00