Commit Graph

5971 Commits

Author SHA1 Message Date
Paweł Banaszewski ebb0a2b606 Added scope as tracing attribute
Kubernetes-commit: e4169d7f4381595152f6fa862af2227950f3fc76
2022-11-08 11:22:57 +00:00
Kubernetes Publisher 20c697acfa Merge pull request #112137 from MikeSpreitzer/add-concurrency-allocation-algorithm
Add solver for APF concurrency rebalancing

Kubernetes-commit: 5a1fb17e2e07d9ddd89d83371595c72dee42e87d
2022-11-08 13:37:03 +00:00
Wojciech Tyczyński a29f52cb30 Standardize naming in generic storage watcher tests
Kubernetes-commit: 593742f092e1ae81988c12e6d833acb29c02009e
2022-11-08 09:52:59 +01:00
Paco Xu 3081aacf4c upgrade prometheus-client to v1.14.0
Kubernetes-commit: c3add32859da5ff8156d30cf7c1697a2fb2a2eea
2022-11-08 16:25:12 +08:00
Kubernetes Publisher d50444613b Merge pull request #113696 from tallclair/path
Fix etcd path construction

Kubernetes-commit: aa66cec6fa6e6804669363d54dc8971a6cb59b79
2022-11-08 06:29:00 +00:00
Kubernetes Publisher aa0e1e5e62 Merge pull request #113314 from cici37/celIntegration
CEL validation in Admission chain

Kubernetes-commit: 595ea324113580ae61f4a15ab3e5b22303a195cf
2022-11-08 06:28:58 +00:00
Kubernetes Publisher ab224f3839 Merge pull request #113697 from aramase/kms-duplication-name-validation-part-2
[KMS]: add validation for duplicate kms config name when auto reload is enabled

Kubernetes-commit: a236e4ca6f3860a5acbbfc62bb3fdd88ac7e2757
2022-11-08 06:28:54 +00:00
Kubernetes Publisher fda66ef343 Merge pull request #113688 from dashpole/update_utils
Update k8s.io/utils to fix util tracing panic

Kubernetes-commit: fa2e203a6bde89a84443ee9813e1f27aa31326a9
2022-11-08 06:28:52 +00:00
Kubernetes Publisher 9e009a746a Merge pull request #113682 from pawbana/add-verb-resource-to-api-server-tracing
Add verb resource to api server tracing

Kubernetes-commit: 887d92d20b3d1538ba900c466ead25ed662179cc
2022-11-08 06:28:50 +00:00
Kubernetes Publisher fe7d5b4b34 Merge pull request #113649 from andrewsykim/apiserver-identity-hash
apiserver identity : use SHA256 hash in lease names

Kubernetes-commit: 3d5725d9c09ef0be2e6aba4fdc665b2bd4a3fc96
2022-11-08 06:28:46 +00:00
Kubernetes Publisher 16a641df6c Merge pull request #113529 from enj/enj/i/kms_single_healthz
kms: add wiring to support automatic encryption config reload

Kubernetes-commit: b1dd1cd2f177ecf228cbbfb0db9327a276098be8
2022-11-08 06:28:44 +00:00
Kubernetes Publisher a3a25ce15d Merge pull request #113666 from wojtek-t/storage_standard_test_naming
Standardize naming in generic storage tests

Kubernetes-commit: f8750e2faf99fb512c7c8fcce12ecaa8f793bd3c
2022-11-08 06:28:42 +00:00
Kubernetes Publisher 5a2966576c Merge pull request #113648 from SataQiu/improve-supported-media-type-20221105
kube-apiserver: print supported media types on failure to find a serializer

Kubernetes-commit: b4156ea47b3caf0088c6316ecd89afe715830807
2022-11-08 06:28:39 +00:00
Andrew Sy Kim 3f92018a06 apiserver: use the correct error when logging errors updating managedFields
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>

Kubernetes-commit: efdd06718646fc7e8912f8aaa8fc7bef3f7cdba0
2022-11-07 23:00:58 -05:00
Nilekh Chaudhari 25c1e9054d feat: implements kms encryption config hot reload
This change enables hot reload of encryption config file when api server
flag --encryption-provider-config-automatic-reload is set to true. This
allows the user to change the encryption config file without restarting
kube-apiserver. The change is detected by polling the file and is done
by using fsnotify watcher. When file is updated it's process to generate
new set of transformers and close the old ones.

Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>

Kubernetes-commit: 761b7822fca569d475f782b135ef433e5b014147
2022-11-07 22:15:56 +00:00
Cici Huang 81aeb1b5e9 Integrate cel admission with API.
Co-authored-by: Alexander Zielenski <zielenski@google.com>
Co-authored-by: Joe Betz <jpbetz@google.com>

Kubernetes-commit: e7d83a1fb7b3e4f6a75ed73bc6e410946e12ad9f
2022-11-07 21:38:55 +00:00
Cici Huang 58f75bc06a Add match check for policy and binding.
Co-authored-by: Max Smythe <smythe@google.com>

Kubernetes-commit: 46f97d4662d5b403badd29675d79d0c74875b9f0
2022-11-07 21:33:17 +00:00
Cici Huang 9f6b13b337 Update admission initializers.
Moved RestMapper and add DynamicClient

Kubernetes-commit: c8a089de4692ef94ec25fc5874906640d0ec9a28
2022-11-07 21:24:46 +00:00
David Ashpole 911a29e64e migrate another usage of utiltrace to component base tracing
Kubernetes-commit: 788b3c3bc3694ae1b28aac31616bd53464e460a1
2022-11-07 21:13:31 +00:00
Anish Ramasekar 525c6769a4 [KMS]: validate duplicate kms config name for v1 and v2 when reload=true
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: 47f8c4bec63a2c4d6406cd615b41cd16f12be434
2022-11-07 20:16:04 +00:00
Alexander Zielenski 7c2a6f0ee8 fix possible race in admission test of listwatch
Kubernetes-commit: 4e217159cfc1441f3c3234059fc6fca0eb13a66d
2022-11-07 12:01:44 -08:00
David Ashpole be21a90c1e update k8s.io/utils to fix util tracing panic
Kubernetes-commit: 3f1511c8e9a64cf60821036aa1fc3ec9d58a2931
2022-11-07 19:30:21 +00:00
David Ashpole 1c6757fe8d graduate API Server tracing to beta
Kubernetes-commit: fc3cec6bf3f39037cd527f49b35df6c212218127
2022-11-07 17:30:09 +00:00
Paweł Banaszewski e21a3f224f Added simple tests and changed lazyVerb String method to the same as httplog uses
Kubernetes-commit: b31339231314ae8a72481cfda45539e35097450a
2022-11-07 17:13:26 +00:00
Kubernetes Publisher 8dcc6deff0 Merge pull request #113661 from nckturner/fix-server-diagram
Fix formatting of API server diagram

Kubernetes-commit: 62e9df085a82a5e49c435e5b66f988095a52fe3b
2022-11-07 06:52:28 -08:00
Paweł Banaszewski 490f0b7444 Added Verb and Resource to request trace attributes
Kubernetes-commit: fad094cb70c26f962c49d615b1f48326aa25181d
2022-11-07 14:33:40 +00:00
Nick Turner e1dde980a4 Fix formatting of API server diagram
Kubernetes-commit: 02e3fbfeff5c3044321fc59f0427b64fbcfec70d
2022-11-06 16:41:11 -08:00
Kubernetes Publisher 09ffb0c8b9 Merge pull request #113588 from wojtek-t/generalize_cacher_tests_1
Reuse generic GetListNonRecursive test for watchcache

Kubernetes-commit: 1f9e20eb8617e312f9f61d28d93ed29e988d953d
2022-11-06 00:03:37 +00:00
Kubernetes Publisher 6c101e715a Merge pull request #112582 from thockin/validation-msgs
Clarify a few validation messages

Kubernetes-commit: dc129a29d2d226c1228e9297147687e5b546326b
2022-11-06 00:03:34 +00:00
Andrew Sy Kim c4a89b8fc6 apiserver identity : use SHA256 hash in lease names
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>

Kubernetes-commit: 5b3a9e2d758650ff2919b8343d2a34ba8ca84b2b
2022-11-05 13:52:07 -04:00
Kubernetes Publisher a7cab41155 Merge pull request #113217 from dashpole/filterlatency_tracing
FilterLatency tracing for APIServerTracing

Kubernetes-commit: f522df5b49e3165f228fc6e3fd03df76c738bb72
2022-11-05 16:03:45 +00:00
SataQiu b683f5d16a kube-apiserver: print supported media types on failure to find a serializer
Kubernetes-commit: 56b46e13c21b483ebc70bd6e151eea0a45b399e8
2022-11-05 23:03:23 +08:00
Wojciech Tyczyński 0ed87195b0 Standardize naming in generic storage tests
Kubernetes-commit: e49c225eb9e7c428aca97e8031089e7ad91ca7c4
2022-11-05 12:14:56 +01:00
Kubernetes Publisher 352315aae1 Merge pull request #113307 from andrewsykim/apiserver-identity-hostname
apiserver identity: use persistent names for lease objects

Kubernetes-commit: c8a3657bde08fde0240cba2e8579b160e95bc459
2022-11-04 16:03:30 +00:00
Andrew Sy Kim d9ed5cedb4 kube-apiserver: promote APIServerIdentity to Beta and enabled by default
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>

Kubernetes-commit: 196a3b99f5e13cf13af4e24e988bd4d88b5bcb97
2022-11-04 10:41:46 -04:00
Wojciech Tyczyński 82397f8421 Fix naming in storage test setup
Kubernetes-commit: 1bc95675b19c68807ed3ae45a24701fc5c2fb935
2022-11-04 15:37:47 +01:00
Kubernetes Publisher 7a3a2a5fd3 Merge pull request #113483 from MikeSpreitzer/add-borrowing-metrics
Define metrics for API Priority and Fairness borrowing

Kubernetes-commit: 7ae0396666451d7afce0748f5d197b10fb77c193
2022-11-04 12:18:58 +00:00
Kubernetes Publisher 0c4c6d7377 Merge pull request #113598 from MikeSpreitzer/simplify-seat-demand-stats
apiserver: remove redundant field from seatDemandStats

Kubernetes-commit: 63a7f6ba5da9080670cc3981bd869da222b719f0
2022-11-04 12:18:56 +00:00
Wojciech Tyczyński c51bbc3183 Parallelize tests cases in some storage tests
Kubernetes-commit: 6d85f947bf86d12e4459d31029c41d6049d40c0e
2022-11-04 10:23:40 +01:00
Kubernetes Publisher 6d692b1feb Merge pull request #113535 from kidddddddddddddddddddddd/strict_serializer_audit
Log a warning when dropping unknown fields from loading an audit policy

Kubernetes-commit: a27a323419a52b0b287ee1bdb4f3339b03ade798
2022-11-03 20:03:34 +00:00
Mike Spreitzer 17134f6412 apiserver: remove redundant field from seatDemandStats
Kubernetes-commit: 4ad1c0f9cb8aa54efa127975aaa9d5bd3080e8d0
2022-11-03 10:41:50 -07:00
Kubernetes Publisher 162832c9bc Merge pull request #113555 from wojtek-t/refactor_storage_tests_5
Refactor storage tests - part 5

Kubernetes-commit: f536b3cc4fb8e396086bc6a0108018a783bf3cad
2022-11-03 16:03:24 +00:00
Wojciech Tyczyński 44c802979e Reuse generic ListNonRecurisve test for cacher
Kubernetes-commit: e301306d89a69ff1a328a4ae3fa39a9e3deb022e
2022-11-03 14:58:34 +01:00
Paco Xu 9672d65710 upgrade github.com/prometheus/client_golang to v1.13.1
Kubernetes-commit: 1d04ee4cb69f4c97d8a7fc4ad7bee714585d6ada
2022-11-03 16:22:07 +08:00
Wojciech Tyczyński b312c7eb5b Stop exporting storage testing utility functions
Kubernetes-commit: 37db332298fc6d14a798f610ce6049792299f0b1
2022-11-03 08:47:38 +01:00
kidddddddddddddddddddddd 0547548a94 strict decode policy first
Kubernetes-commit: 5dcfaae7b90c4838e488eace376e05c9e807f23b
2022-11-02 16:17:52 +08:00
Monis Khan e137a3da77 kms: add wiring to support automatic encryption config reload
This change adds a flag --encryption-provider-config-automatic-reload
which will be used to drive automatic reloading of the encryption
config at runtime.  While this flag is set to true, or when KMS v2
plugins are used without KMS v1 plugins, the /healthz endpoints
associated with said plugins are collapsed into a single endpoint at
/healthz/kms-providers - in this state, it is not possible to
configure exclusions for specific KMS providers while including the
remaining ones - ex: using /readyz?exclude=kms-provider-1 to exclude
a particular KMS is not possible.  This single healthz check handles
checking  all configured KMS providers.  When reloading is enabled
but no KMS providers are configured, it is a no-op.

k8s.io/apiserver does not support dynamic addition and removal of
healthz checks at runtime.  Reloading will instead have a single
static healthz check and swap the underlying implementation at
runtime when a config change occurs.

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 22e540bc48d9bf698c4f381ccb56ed57dea0dae2
2022-11-02 01:08:42 -04:00
Joseph Anttila Hall 70826774b2 egress_selector: prevent goroutines leak on connect() step.
Kubernetes-commit: 906b97931abf3c53238eb0294de9c5f27fc08bde
2022-11-01 21:55:42 -07:00
Mike Spreitzer 770f2e1fa4 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>

Kubernetes-commit: feb42277884bc7cfbd6f0bb1d875cc63b1b6caac
2022-10-31 16:13:25 -07:00
Mike Spreitzer 084f1abd96 apiserver: define metrics for API Priority and Fairness borrowing
Kubernetes-commit: ba5ec78916ae5fe9e400a298da6879515029a12f
2022-10-31 15:09:39 -07:00