Commit Graph

804 Commits

Author SHA1 Message Date
Marek Siarkowicz b43a2467d5 Add etcd kubernetes interface package to vendor
Kubernetes-commit: 249ad2a6137cc8f1e0ccb7f0aef9ff4ba38927b9
2024-05-31 10:27:51 +02:00
Abu Kashem 14881364b3 refactor: extract decode functions into an interface for etcd3 store
Kubernetes-commit: 1d1a656d8de1cdb99deaa6ec771aa354616eaa16
2024-09-24 07:19:19 -04:00
Abu Kashem 33cfd964ef refactor: storage.InternalError should retain the inner error
This is so we can do proper error handling, at the same time
we want to maintain backward compatibility

Kubernetes-commit: f24ec7e00dfd133780b3e6519a19f646c0dbde63
2024-09-26 09:44:09 -04:00
Abu Kashem 3a0975b22c refactor: add delete options for Delete method in storage interface
Kubernetes-commit: bc0ea34bc380e073a7278216fe6690a1b9aee48c
2024-09-19 10:31:08 -04:00
Abu Kashem f28acc6161 refactor etcd store conditional delete
Kubernetes-commit: fecab0713b96bb0d528aea58900942ae0cb52260
2024-09-19 13:14:52 -04:00
Lukasz Szaszkiewicz 36e57697d1 apiserver/handlers/watch: encode initialEventsListBlueprint with watchEncoder (#127587)
* apiserver/handlers/get: construct versionedList

* storage/cacher: document caching the serialization of bookmark events

* endpoints/handlers/response: add watchListTransformer

* endpoints/handlers/watch: wire watchListTransformer

Kubernetes-commit: fbf1a0dc181ccbeb9925ad9c284d913a25c16562
2024-10-01 11:55:50 +00:00
Matthieu MOREL 17d29da911 fix: use `ErrorContains(t, err` instead of `Contains(t, err.Error()`
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Kubernetes-commit: f777addb05aed8c2861c423fb29946e85151ecf6
2024-09-26 22:22:20 +02:00
Chaunceyctx f7eddd4bda send bookmark right now after sending all items in watchCache store
Kubernetes-commit: 723920253349ee3c272c5b5a77e9d19548c1533c
2024-08-29 17:31:36 +08:00
Lukasz Szaszkiewicz cdd40a3d24 pkg/storage/testing/watcher_tests: RunWatchSemantics checks if the storage has been primed with init data
Kubernetes-commit: e7e2123feb2f1957be490a21aa606cb2dc718432
2024-09-20 09:37:53 +02:00
Lukasz Szaszkiewicz eb3a20ad8b storage/cacher/cache_watcher: processInterval sets RV from the snapshot
Kubernetes-commit: de735be512767dd2eced78530693d2e3ae997e6e
2024-09-20 08:48:31 +02:00
Lukasz Szaszkiewicz 743b5776f9 storage/cacher/cache_watcher: add RV to watchCacheInterval
Kubernetes-commit: f87e4a19c88fa908eb176ee7925f211bafba9b45
2024-09-20 08:47:49 +02:00
Vadim Rutkovsky 7da1f042b3 tracing: add span for cacher.Get
Also updates tracing integration tests for cacher.GetList

Kubernetes-commit: dff0075e7cd687f77fd38337e9ba487bb2437ecc
2024-09-12 14:18:40 +02:00
Andy Goldstein 614f663b4a Use emeritus_*
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>

Kubernetes-commit: 0e228be96f352359847d013ff889522524e1cb98
2024-08-22 17:48:27 -04:00
Andy Goldstein 1ccea00339 Move ncdc to emeritus
I am moving myself to emeritus as I am now firmly on the end-user side
of things.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>

Kubernetes-commit: 3ab816dcabf37acda33c665ab5aa85f1f6163bc1
2024-08-17 13:00:07 -04:00
Abhishek Kr Srivastav 17ab6c21d5 Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>

Kubernetes-commit: 95860cff1c418ea6f5494e4a6168e7acd1c390ec
2024-09-12 18:15:22 +05:30
Lukasz Szaszkiewicz 87a5cdebbc storage/cacher/cacher_whitebox_test:deflake TestCacherDontAcceptRequestsStopped when ResilientWatchCacheInitialization is off
Kubernetes-commit: 5b7faca6b66dc0664f36c611867f5799377b0514
2024-09-20 06:40:47 +02:00
Lukasz Szaszkiewicz bafce892d3 pkg/storage/cacher/cacher_whitebox_test: deflake TestConsistentReadFallback when ResilientWatchCacheInitialization is off
Kubernetes-commit: 077c35ee82e40fa808fa4b45b86d843cded3cfa3
2024-09-20 06:15:22 +02:00
Lukasz Szaszkiewicz 8a764cf9c3 cacher: apply key for initial events only if the call is not recursive
Kubernetes-commit: 7cb51b1c278f9eb57c43f929fcc80bfed8438e17
2024-09-10 10:58:26 +02:00
Marek Siarkowicz a8c26a18b8 Extract watch cache store to separate file and cover with tests
Kubernetes-commit: c93d2e8fb19da0082765cb3e5a6db952eca628ce
2024-08-28 13:31:02 +02:00
Marek Siarkowicz 94a5e3cd04 Refactor WaitUntilFreshAndList to split out filtering to separate function
Kubernetes-commit: 7400d57943cf7576925d54e7daa42e397e71dfe4
2024-08-28 12:59:38 +02:00
古九 e312f49d45 fix short circuit if the compaction request from apiserver is disabled
Kubernetes-commit: 9fef30117f89830cc8b17610c359141b663844f1
2024-08-12 10:21:49 +08:00
Marcus Ruddick 9c8c6ccc4d kmsv2: fixed issue with an invalid authority header being sent by the KMSv2 service
Kubernetes-commit: 618ca85bc9482ea11cf792331688fdf0c7b54518
2024-08-26 14:43:02 -10:00
Marek Siarkowicz de0559ec7b Benchmark storage
Kubernetes-commit: fa5008807add2776ff87f346a7b7d3c029d19efc
2024-07-02 22:50:57 +02:00
Marek Siarkowicz 132d3e46d6 Add paging tests
Kubernetes-commit: 99e69569808cf746262b25a9d9d515c26256c7e5
2024-07-07 16:15:47 +02:00
Keerthan Reddy Mala fcf807e7b4 add resource to the transformation metrics
Kubernetes-commit: 3a8df1efdd83015773be4afd409b0f4cb7eab654
2024-08-01 15:46:50 -07:00
Marek Siarkowicz 3adae5fd46 Make object transformation concurrent to remove watch cache scalability issue for conversion webhook
Test by enabling consistent list from cache in storage version migrator stress test that uses
conversion webhook that bottlenects events comming to watch cache.

Set concurrency to 10, based on maximum/average transform latency when
running stress test. In my testing max was about 60-100ms, while average
was 6-10ms.

Kubernetes-commit: bb686f203308481bcd7808f767171cdef27e12a0
2024-07-22 11:24:37 +02:00
Marek Siarkowicz 6c5ee08ccf Implement fallback for consistent reads from cache
Kubernetes-commit: 35962561e44425fe5e23f19aeccba9269fab3a56
2024-07-30 18:57:22 +02:00
Matthieu MOREL 8705baa8b2 fix: enable empty and len rules from testifylint on pkg package
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>

Kubernetes-commit: f014b754fb5925dfbca6e27a44d0c3968b157e14
2024-06-28 21:20:13 +02:00
Davanum Srinivas 1292729d42 Fix for typecheck doesn't notice compile errors in test files
- ensure we add all the staging modules so the _test files in there are "loaded"
- use build tags to skip tests that fail to build in specific os/arch pairs

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Co-Authored-By: Tim Hockin <thockin@google.com>

Kubernetes-commit: c230a45383c372e3861de3d4854cdfe28f4c482f
2024-07-02 16:26:41 -04:00
Wojciech Tyczyński a643e14347 Implement resilient watchcache initialization post-start-hook
Kubernetes-commit: a5772bd42593f6492f5169eef49bc9884f95abba
2024-06-13 11:02:18 +02:00
Lukasz Szaszkiewicz 5e71b4e71d apiserver/storage/watchcache: WaitUntilFreshAndList supports path prefix
Kubernetes-commit: 2f9660db6b0ba37ff383559b1b0324c635f1eb66
2024-06-26 14:34:32 +02:00
Lukasz Szaszkiewicz 54645c663b apiserver/storage/cacher: cache supports pagination
Kubernetes-commit: 09e85983d84b5f6c3fed6c09dd0adcbdde7e9d5f
2024-06-10 10:14:38 +02:00
Lukasz Szaszkiewicz f0e44d48b8 apiserver/storage: storagetesting.RunTestList validates RemainingItemCount
Kubernetes-commit: f9b15700fb5a99ab74d51c7779ea2aae0f51168c
2024-06-27 11:01:37 +02:00
Lukasz Szaszkiewicz 9afcce8b2b storage/cacher/cacher_whitebox_test.go: deflake TestWaitUntilFreshAndListFromCache
Kubernetes-commit: 662672a6cacd71ad0cfc168a793d6a75a7e0ffff
2024-06-26 15:04:15 +02:00
Wojciech Tyczyński 58b911dc71 Fix test flakes for TestWatchSemantics
Kubernetes-commit: 5081ba45f9ed84784a250338ee6d96b485ff4e4a
2024-06-26 17:49:54 +02:00
Lukasz Szaszkiewicz 4500696478 apiserver/storage: decrease running time of RunWatchSemantics
Kubernetes-commit: c6ef512b5bb15aa3c2430ae03dad91e16a342bce
2024-06-26 10:49:20 +02:00
Marek Siarkowicz 6c1033e89d Remove 5 seconds from TestWatchStreamSeparation execution by reusing etcdserver
Kubernetes-commit: 1c111c603e1962b4bfd5aae40d8a5ecc0e3ad9d5
2024-06-26 11:32:57 +02:00
Paco Xu 1c9c46740e Revert "apiserver/storage/cacher: consistent read from cache supports limit"
Kubernetes-commit: df17ea2e37d1b36dcda10fe20de5484c41c615b5
2024-06-26 11:51:12 +08:00
Davanum Srinivas 11d0eb6174 drop OWNERS in kubeadm
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 16e24513b76f66bfa47a93291ec52a2fcd1e11c0
2024-06-25 06:36:05 -04:00
Davanum Srinivas cca712b8b8 Add sig/etcd labels for related directories
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 1390ac0e250da4697b706c68cbb955268e27037d
2024-06-24 17:03:34 -04:00
Lukasz Szaszkiewicz 2aadb1cb38 cacher: returns an error when watch list was requested and storage.RequestWatchProgress is disabled
Kubernetes-commit: cb8cbc60a15dd340ea834974355bd2f03453727c
2024-06-17 15:29:59 +02:00
Lukasz Szaszkiewicz 062ed2e6c0 apiserver/storage/cacher: cache supports pagination
Kubernetes-commit: 87536f367dd67b4fd9b1c7ee31189896921f2f9e
2024-06-10 10:14:38 +02:00
Marek Siarkowicz 22c2235078 Explicitly disable ConsistentListFromCache in TestGetListNonRecursiveCacheBypass
Kubernetes-commit: 4e51e9cff8f48a38bb5ce45e8602842486c3a59e
2024-02-26 16:43:24 +01:00
Lukasz Szaszkiewicz 2ac45c2a57 storage/cacher/cacher_whitebox_test.go: deflake tests that require storage.RequestWatchProgress
Kubernetes-commit: 47a61f03d4fad96fb40f4c1c6857061ee68b7ca5
2024-06-17 16:54:44 +02:00
Marek Siarkowicz 2abbfffe9a Fix TestGetListRecursivePrefix for all types of LIST
Kubernetes-commit: c207f967ac3122d3a2a5ae4befdc5ada22347323
2024-06-19 10:31:37 +02:00
xyz-li e5e53b7acc apiserver: fix watch namespace
For request like '/api/v1/watch/namespaces/*', don't set scope.namespace.
Because the func `addWatcher` add a watcher to allWatchers with the value `scope.namespace` not empty.
But the function `dispatchEvent` dispatch event with an empty namespace.

Signed-off-by: xyz-li <hui0787411@163.com>

Kubernetes-commit: 818fabe37b3fd7cebe36a43244120388977373cd
2024-05-27 17:48:49 +08:00
Lukasz Szaszkiewicz 253c97b2e8 apiserver/storage: factor PrepareContinueToken to a new function (#125548)
* apiserver/storage/continue: intro PrepareContinueToken

PrepareContinueToken prepares optional
parameters for retrieving additional results for a paginated request.

This function sets up parameters that a client can use to fetch the remaining results
from the server if they are available.

* apiserver/storage/etcd3: refactor to use PrepareContinueToken

Kubernetes-commit: efef32652af0af08a0b9c9bc547a4dce4a95f9f5
2024-06-17 18:23:23 +00:00
Mauri de Souza Meneguzzo 48995fc82a Fix flaking TestStoreListResourceVersion
Kubernetes-commit: e59988d769a87ec3efb12af0f9909f7549eecf05
2024-06-11 23:12:23 -03:00
TommyStarK 2c2eb3836c kube-apiserver: remove deprecated otel NewNoopTracerProvider
Signed-off-by: TommyStarK <thomasmilox@gmail.com>

Kubernetes-commit: cce8551272de44882a3cd4fc7c06805247941086
2024-06-07 19:57:37 +02:00
Wojciech Tyczyński 147e65f573 Reduce lock contention by using reader lock in watchcache interval
Kubernetes-commit: 6f0a400a1a7bb7d77d13181a91654f77f612c856
2024-06-11 12:20:57 +02:00