Commit Graph

6292 Commits

Author SHA1 Message Date
Wojciech Tyczyński 072d278e39 Generalize few watch tests from cacher
Kubernetes-commit: 45e836a968acc113cb03768cd8c730bea89bd332
2023-04-17 21:48:08 +02:00
Kubernetes Publisher 9f0e077465 Merge pull request #117352 from mohitsharma-in/update/golang_x_tools
dependencies: Update golang.org/x/tools to v0.8.0

Kubernetes-commit: bda7e8979088614c60ee21fd2602d00786e2ea78
2023-04-20 10:20:03 +00:00
Mohit Sharma 681a884b7b Dependencies Update golang.org/x/tools v0.7.0 to v0.8.0
Kubernetes-commit: 6f90c5363301c9417a3a806cac69f3e79e66a66c
2023-04-14 04:39:43 -07:00
Kubernetes Publisher 984290b930 Merge pull request #117014 from p0lyn0mial/upstream-cacher-init-expired-watchers
cacher: do not simply popExpiredWatchers when the cacher hasn't dispatched any event

Kubernetes-commit: f0e01d2d9e35d698bebb417b7bcc7288df8f4146
2023-04-19 08:43:11 -07:00
Lukasz Szaszkiewicz 0df626818a cacher: do not popExpiredWatchers when the cacher hasn't dispatched any event
If the cacher hasn't seen any event (when lastProcessedResourceVersion is zero) and
the bookmarkTimer has ticked then we shouldn't popExpiredWatchers. This is
because the watchers wont' be re-added and will miss future bookmark events when
the cacher finally receives an event via the c.incoming chan.

Kubernetes-commit: 6db4cbfde7babfb34f5cd1059c769ec2d870f12a
2023-04-19 15:29:13 +02:00
Lukasz Szaszkiewicz 55dd2b5223 cacher avoid double locking (#117410)
* cacher: remove locking from watcherBookmarkTimeBuckets

it turns out that the watcherBookmarkTimeBuckets
is called from only three places/methods: startDispatching, finishDispatching and Watch.
All these methods acquire c.Lock() before touching watcherBookmarkTimeBuckets.

Thus we could remove explicit locking in
watcherBookmarkTimeBuckets since the access is already synced.

* cacher: rename watcherBookmarkTimeBuckets methods to indicate that proper synchronisation must be used

Kubernetes-commit: eab66a687b282266f0520b79166f7f55828ffd28
2023-04-19 15:13:11 +02:00
Kubernetes Publisher 67ebdf32c3 Merge pull request #117408 from cenkalti/backoff
dependencies: update github.com/cenkalti/backoff/v4 to v4.2.1

Kubernetes-commit: 0d41d28ea2184be3a249e3875735d8a1462288cf
2023-04-19 14:03:36 +00:00
Kubernetes Publisher 9b297a6439 Merge pull request #117399 from mohitsharma-in/update/golang_time
dependencies : Update golang.org/x/time v0.3.0

Kubernetes-commit: cf89189ca3a3e5d280ba1cb09998c4b88dc1e127
2023-04-19 14:03:35 +00:00
Cenk Alti 3320150894 dependencies: update github.com/cenkalti/backoff/v4 to v4.2.1
Signed-off-by: Cenk Alti <cenkalti@gmail.com>

Kubernetes-commit: 29b6c54d158d894f46e7d4572c7aa0452477b265
2023-04-17 18:20:27 -04:00
Mohit Sharma cfbc53d338 Dependencies Update golang.org/x/timet 90d013bbcef8 to v0.3.0
Kubernetes-commit: 4d73864026cde02f4a1cdf9e889a124174d38e38
2023-04-16 22:18:35 -07:00
Kubernetes Publisher 3288bbccd7 Merge pull request #117275 from akhilerm/update-coreos-deps
dependencies: update coreos dependencies

Kubernetes-commit: 1d27cbc784a5fb79f4a910515fb8609bb745bfb9
2023-04-14 18:18:33 +00:00
Akhil Mohan c16cde40ab dependencies: update go-semver to v0.3.1
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>

Kubernetes-commit: 5bce18c98ecc6d8cea6b3ababc49691dc0438b48
2023-04-13 23:29:48 -07:00
Akhil Mohan de75faf66f dependencies: update go-oidc to v2.2.1
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>

Kubernetes-commit: d7270f4ba72d8d2e749cbd812936e4d3d3eadf6c
2023-04-13 23:25:57 -07:00
Akhil Mohan 41a75810f4 dependencies: update go-systemd to v22.5.0
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>

Kubernetes-commit: 1595d7f52d7e8d489f4ea8f573fa976c35dc242a
2023-04-13 23:21:38 -07:00
Kubernetes Publisher e643c04bdd Merge pull request #117278 from haoruan/cleanup/replace-spew-with-dump
replace spew methods with dump methods

Kubernetes-commit: d060d487dcd74bc1a557f9378035696db40c64c2
2023-04-14 06:12:11 +00:00
Kubernetes Publisher d3fa9a05b8 Merge pull request #117285 from humblec/azure-go-autorest
dependencies: update gh/Azure/auto-test/{adal,validation}

Kubernetes-commit: ba0a8f9cceb513bc36bd803e9bf8f9a8c3912ff2
2023-04-13 22:27:57 +00:00
Humble Chirammal 4ab5a3af89 dependencies: update gh/Azure/auto-test/{adal,validation}
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>

Kubernetes-commit: 6d13cad2cf56d0bad77a6410a0c36b2cf8f0df57
2023-04-13 23:25:48 +05:30
Kubernetes Publisher e395bf0215 Merge pull request #116896 from thockin/apimachinery_util_diff_cleanup
apimachinery util/diff cleanups

Kubernetes-commit: c3e3ff989ac9abfb0dc3b958fcb698fcce952f8c
2023-04-13 13:56:56 +00:00
Hao Ruan f695e2298f replace spew methods with dump methods
Kubernetes-commit: c4e1b01416ec05e6a520a181d4ce3b4333adb4e4
2023-04-13 09:41:07 +08:00
Tim Hockin 0165503c5a Replace uses of ObjectReflectDiff with cmp.Diff
ObjectReflectDiff is already a shim over cmp.Diff, so no actual output
or behavior changes

Kubernetes-commit: bc302fa4144d21a338683cd83701661f97be4aba
2023-03-23 11:34:03 -07:00
Tim Hockin aa9b8ec0fe Replace uses of ObjectGoPrintDiff with cmp.Diff
ObjectGoPrintDiff is already a shim over cmp.Diff, so no actual output
or behavior changes

Kubernetes-commit: 9627c50ef37f3b5274486e6f5ad37b73b1b69bf0
2023-03-23 11:31:25 -07:00
Tim Hockin 1431da0154 Replace uses of diff.ObjectDiff with cmp.Diff
ObjectDiff is already a shim over cmp.Diff, so no actual output or
behavior changes

Kubernetes-commit: 29c0b73d640b6e50c4f2dfeee7b07ca66a530dbd
2023-03-23 11:29:01 -07:00
Tim Hockin 61d7d16e0e Replace apimachinery diff.StringDiff with cmp
I forced failures of most of these tests and verified readability

Kubernetes-commit: 97bab44cae3857710bfb072d233e654784082ee3
2023-03-23 11:10:32 -07:00
iyear b1805a9a4d apiserver/etcd: add request and request_error metrics (#117222)
* apiserver/etcd: add request and request_error metrics

Signed-off-by: iyear <ljyngup@gmail.com>

* apiserver/etcd: rename etcdRequestCounts metric

Signed-off-by: iyear <ljyngup@gmail.com>

---------

Signed-off-by: iyear <ljyngup@gmail.com>

Kubernetes-commit: 4f6714ef42dcdb1b35bb2d8581c1ef83d59f02d1
2023-04-12 22:02:45 +08:00
Kubernetes Publisher cff2363f5e Merge pull request #117137 from p0lyn0mial/upstream-streaming-api-deadlock
cacher: prevent a potential deadlock

Kubernetes-commit: afcc207feb0da6c5866dea33b07856091328f9ab
2023-04-12 12:10:28 +00:00
Kubernetes Publisher 2bd0999ce9 Merge pull request #116865 from alexzielenski/apiserver/apply/move-transformer
move check for noop managed field timestamp updates

Kubernetes-commit: 5f23f835879b514e9bf16809059b38957d20a486
2023-04-12 08:23:52 +00:00
Kubernetes Publisher 98ef921952 Merge pull request #117154 from p0lyn0mial/upstream-cacher-size-rlock
watchcache: currentCapacity acquires a read lock

Kubernetes-commit: 6262d253719213503ce4d9b887fb39700975b8a8
2023-04-12 08:23:50 +00:00
Kubernetes Publisher ada7c4aad6 Merge pull request #116442 from benluddy/cel-admission-vestigal-errcheck
Remove vestigal err check from CEL admission controller.

Kubernetes-commit: 9b45cb9d5587c2a63f9d85ca578efcd1d45a6099
2023-04-12 08:23:48 +00:00
Kubernetes Publisher ba2cefc22c Merge pull request #115076 from hasheddan/go-restful
Fix gorestful typos in the APIServerHandler.Director docstring

Kubernetes-commit: 379a1f376989a582e80738a63cc85c633f247ecf
2023-04-12 08:23:47 +00:00
Kubernetes Publisher e8fa17c2ec Merge pull request #116987 from wojtek-t/fix_non_recursive_list_test
Deflake TestGetListNonRecursive

Kubernetes-commit: 01c0495463b660d2a7e770b22b238e3484e7e3e3
2023-04-12 04:34:50 +00:00
Kubernetes Publisher 722690c0d0 Merge pull request #116893 from aramase/aramase/t/generate_transformer_test
[KMSv2] add tests for generate transformer

Kubernetes-commit: d78ca2a552a4df17adc87c25a7b16b32002006ad
2023-04-12 04:34:48 +00:00
Kubernetes Publisher 90c5f14b70 Merge pull request #116881 from ritazh/kms-test-fix
kmsv2: test cleanup

Kubernetes-commit: 66c78653f1c5bca4f9992c971c886043ab5f86da
2023-04-12 04:34:44 +00:00
Kubernetes Publisher c7cbc5a59c Merge pull request #116681 from stlaz/webhook_impersonate_uid
don't ignore UID impersonation in webhook clients

Kubernetes-commit: 27f5601182382ff5ca5b94bb24e42d479d3a370f
2023-04-12 04:34:35 +00:00
Kubernetes Publisher 684582ce79 Merge pull request #116648 from ncdc/admission-clients
admission ApplyTo: take in clients

Kubernetes-commit: 61457b939df36d8e0a44a7d49572f9feff8cd58e
2023-04-12 04:34:31 +00:00
Kubernetes Publisher 815ae0353e Merge pull request #116374 from sxllwx/optimize/etcd3-getlist
ftr(etcd): add benchmarks for getlist

Kubernetes-commit: 62d00139e8712e672de29c23f4adfe7cf6039906
2023-04-12 00:28:20 +00:00
Kubernetes Publisher 9808ea1436 Merge pull request #116348 from jkh52/knp-0.1.2
Bump Konnectivity to 0.1.2

Kubernetes-commit: 68f873250f13bee7a342696454db8c60fa593a92
2023-04-12 00:28:15 +00:00
wangxiang b1bc32fa21 optimize watch-cache getlist (#116327)
* ftr(watch-cache): add benchmarks

* ftr(kube-apiserver): faster watch-cache getlist

* refine: testcase name

* - refine var name make it easier to convey meaning
- add comment to explain why we need to apply for a slice of runtime.Object instead of making a slice of ListObject.Items directly.

Kubernetes-commit: 75f17eb38fc8bbcb360d43dffce6e27a7159d43f
2023-04-12 00:28:10 +00:00
Lukasz Szaszkiewicz 89471f9967 watchcache: currentCapacity acquires read lock
Kubernetes-commit: f138d29bf2df1a67883e6c16249eb4f26d34ec0c
2023-04-07 10:16:46 +02:00
Lukasz Szaszkiewicz cea854521c cacher: prevent a potential deadlock
waitUntilWatchCacheFreshAndForceAllEvents must be called without
a read lock held otherwise the watchcache won't be able to make
progress (i.e. the watchCache.processEvent method that requries acquiring an exclusive lock)

the deadlock can happen only when the alpha watchlist feature flag is on
and the client specifically requests streaming.

Kubernetes-commit: 476e407ffd2ab393840d3f7a9fd01b71698738a3
2023-04-06 09:54:02 +02:00
scott d681755704 ftr(etcd): add benchmarks
Kubernetes-commit: db92cc1388021495e47dbe257a9e6559031cfe51
2023-03-29 21:52:38 +08:00
Wojciech Tyczyński e4d6a4de7c Deflake TestGetListNonRecursive
Kubernetes-commit: 05f4e497f1d692031b31c27098abc1e838e8814b
2023-03-29 13:46:49 +02:00
Kubernetes Publisher 7bde2af536 Merge pull request #116948 from MadhavJivrajani/fix-verify-vendor
.*: update vendor dir and cleanup

Kubernetes-commit: 3a46f2611503b4d8a8ab557bf2541ac9c1be695a
2023-03-27 18:48:05 +00:00
Madhav Jivrajani 3c5cb190cc .*: update vendor dir and cleanup
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: 63b5ca69f1f481b2b4b2ee967f5b8b7b58937211
2023-03-27 19:18:05 +05:30
Kubernetes Publisher 97cf1b06b7 Merge pull request #116877 from enj/enj/i/validate_encrypt_resp_early
kmsv2: validate encrypt response at DEK generation time

Kubernetes-commit: f393e7da7fd201d96f8471a1769594bef47fba90
2023-03-25 00:48:08 +00:00
Anish Ramasekar 20de79e7e1 [KMSv2] add tests for generate transformer
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: f2fe1fff655968f2b5959b387683637c5a1f8e66
2023-03-23 16:40:16 +00:00
Rita Zhang bef9a879e0 Clean up kms test
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>

Kubernetes-commit: 906f0607efc5e12b3108e2b12cdac119fdba7909
2023-03-22 22:38:36 -07:00
Monis Khan 242620fc19 kmsv2: validate encrypt response at DEK generation time
Prior to this change, we wait until the DEK is used to perform an
encryption before validating the response.  This means that the
plugin could report healthy but all TransformToStorage calls would
fail.  Now we correctly cause the plugin to become unhealthy and do
not attempt to use the newly generated DEK.

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

Kubernetes-commit: 5469c198e5d074c7e88e14c3dcbc3ebb2b37cfa8
2023-03-22 21:27:47 -04:00
Monis Khan 021e1f7afd kmsv2: validate encrypt response at DEK generation time
Prior to this change, we wait until the DEK is used to perform an
encryption before validating the response.  This means that the
plugin could report healthy but all TransformToStorage calls would
fail.  Now we correctly cause the plugin to become unhealthy and do
not attempt to use the newly generated DEK.

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

Kubernetes-commit: 479fcf0b13f551517801b8677272c73f3f845565
2023-03-22 21:27:47 -04:00
Alexander Zielenski 29e89f54e2 move check for noop managed field timestamp updates
this check needs to go after any mutations. After the mutating admission chain, rest.BeforeUpdate (which is responsible for reverting updates to immutable timestamp fields, among other things.) is called in the store.Update function. Without moving this check, it will be possible for an object to be written to etcd with only a change to its managed fields timestamp.

Kubernetes-commit: 2b01f63b115e19e8ac9f8ee8e00dde65c5f40290
2023-03-22 11:18:50 -07:00
Kubernetes Publisher 45f55ded30 Merge pull request #116770 from alexzielenski/agg-discovery-err-sources
Fix aggregated discovery race when using CRD and Aggregated APIService under same group

Kubernetes-commit: 8dd3807f4df05abae4a440e0b21750e30bcdd1d3
2023-03-22 01:00:19 +00:00