Commit Graph

904 Commits

Author SHA1 Message Date
Marek Siarkowicz f76f81aa6f Test recursive in TestGetListCacheBypass and separate overrides
Kubernetes-commit: 6d3bff83213b35797b23e89c90bfe939dd30c2cd
2025-03-04 20:07:41 +01:00
Marek Siarkowicz 3cb2448d98 Fix detecting consistent read when watchcache starts handling continue
Kubernetes-commit: 8f83f2446a5e2f11eb751fb56067c663b51cfd12
2025-03-12 18:37:10 +01:00
Marek Siarkowicz 36c1a58d7e Fix typo and pass the environment variable required to enable watchcache consistency checking in GCE tests
Kubernetes-commit: 8b0294daed236dcaf2b2f74ad4a38405118ebbaa
2025-03-13 11:55:23 +01:00
Marek Siarkowicz 6ed423348f Simplify shouldDelegateList
When ResourceVersionMatch is set to NotOlderThan, there is no need to handle continue or resourceVersion="".
The validation in apimachinery will not pass and return:
* "resourceVersionMatch is forbidden when continue is provided"
* "resourceVersionMatch is forbidden unless resourceVersion is provided"

Kubernetes-commit: a0cc02e264ead76dfb0ae75a505e4d2e54219def
2025-03-12 18:20:47 +01:00
Marek Siarkowicz 23e9b2c9d4 Implement consistency checking
Kubernetes-commit: e4d73c56cd055a6e3a23068bd70c424579df40fe
2025-02-27 17:53:06 +01:00
Marek Siarkowicz 73e72d16c5 Unify ListOptions validation between cache and etcd
Kubernetes-commit: ccb607f06b91496d02a3b94253261e03e3280630
2025-03-07 12:26:05 +01:00
Marek Siarkowicz 4305a14262 Separate compactWatchCache from increaseRV
Kubernetes-commit: 15cb82b3b3fa95ba5b914a5a02ac01d42eda892f
2025-02-25 14:44:50 +01:00
Marek Siarkowicz f422062046 Pass storage.ListOptions to WaitUntilFreshAndList
Kubernetes-commit: e6cf9dd1663a9a54fa673873e8e97641f69bcefd
2025-02-19 11:20:04 +01:00
Marek Siarkowicz 79ec45326d Run lists tests in subtests
Kubernetes-commit: 7a84e7630f91014fa3b632d8800e9a943003001c
2025-03-03 20:50:37 +01:00
Marek Siarkowicz 9e523945a2 Remove limit support from btree store
We cannot use limit as it would apply it before filtering, which is done
in cacher. Limit is not currently used, but let's remove it to be save,
until filtering is implemented in store.

Kubernetes-commit: 168c338f7cb44a08f3d1a7e1d0e72cac241e9a29
2025-02-25 19:17:30 +01:00
Marek Siarkowicz 3ad93853da Move GetCurrentResourceVersion to storage.Interface
Kubernetes-commit: fea89f25d1bfd7290bb0165f49a6d288ab5f717a
2025-02-24 19:49:45 +01:00
Marek Siarkowicz a4587170bd Move watch progress to separate package.
Kubernetes-commit: 740db0f01d9bceaa7bd6c0b6c5e5f96fc78c04dd
2025-02-25 13:53:17 +01:00
Marek Siarkowicz a64613cb08 Rename CacheProxy to CacheDelegator
Kubernetes-commit: 4c635ecf8250c7493481b9b8fb88e384de1b41db
2025-02-24 19:07:25 +01:00
Lukasz Szaszkiewicz 3aea7778be storage/cacher/ready: dynamically calculate the retryAfterSeconds
retryAfterSeconds is based on the time elapsed since the state (ready, unready) was last changed.

Kubernetes-commit: 04f0bd4e83bbc0a24b8a924333544be86b252c97
2024-10-14 08:17:14 +02:00
Marek Siarkowicz 09c0e7d0cd Add snapshotting of watch cache behind a feature gate
Kubernetes-commit: 2de2093bcef6544ef17c84116fbd751fc429820a
2025-02-19 17:03:48 +01:00
Marek Siarkowicz d522031d97 Ensure that btree threadedStoreIndexer implements orderedLister
Kubernetes-commit: 99881453838a63730fb34b6bd02775ae08320184
2025-02-19 11:47:26 +01:00
Antoni Zawodny efe7a1b26d Add watch cache capacity upper bound adjusting logic
Kubernetes-commit: 2173a0fafd448e55b7738b88fbbab392125dd975
2025-02-21 15:07:01 +01:00
xin.li afb79f83b3 fix wrong assertion on tests
Signed-off-by: xin.li <xin.li@daocloud.io>

Kubernetes-commit: bc4ae15d77beab23f321bf6547f82c04ba27c3fa
2025-02-22 12:39:01 +08:00
Marek Siarkowicz 476d81d4ba Test continuations and exact revision LISTs
Kubernetes-commit: 034285dc4774f2217ca4df4626ca44b8f5f4f261
2025-02-18 17:32:41 +01:00
Marek Siarkowicz 1e6e6f0a46 Refactor TestList and validate continuations to allow testing pagination and more exact RVs in the future
Kubernetes-commit: 764e13e27aedfd9e304e6014af23f20b5619216b
2025-02-19 17:10:58 +01:00
张可10140699 9da16fa551 Fix non-recursive list should also read RequestWatchProgress feature when consistent list from cache is enabled
Kubernetes-commit: bdf2e2d0646fcb6fa56289d85222e2de0b686244
2025-02-20 08:39:36 +08:00
Lukasz Szaszkiewicz 23e8a6cc2f cacher: decrease the running time of TestConsistentReadFallback
Kubernetes-commit: 601c0e359dc959bbfaf42c5d8a8a0a9a2175db74
2025-01-28 13:31:43 +01:00
Lukasz Szaszkiewicz 8a149c9296 cacher/cacher_whitebox_test: newTestCacherWithoutSyncing allow passing a clock
Kubernetes-commit: cfd6d9a2b4476d4256959dc2ebdd517f20191ea3
2025-01-27 19:51:35 +01:00
Marek Siarkowicz 0167eb5d20 Deprecate WatchFromStorageWithoutResourceVersion
Around the 1.31 release, we discovered that a change introduced in 1.27 allowead
clients to open WATCH requests directly to etcd. This had detrimental consequences,
enabling abusive clients to bypass caching and overwhelm etcd.
Unlike the API server, etcd lacks protection against such behavior.

To mitigate this, we redirected all WATCH requests to be served from the cache.
The WatchFromStorageWithoutResourceVersion feature gate was retained as an escape hatch.
However, since we have no plans to allow direct WATCH requests to etcd again,
this flag is now obsolete.

Direct WATCH requests to etcd offer no advantage, as they don't provide stronger
consistency guarantees. WATCH operations are inherently inconsistent; unlike LIST
operations, they do not confirm the resource version with a quorum. While Kubernetes
uses the WithRequireLeader option on WATCH requests to prevent maintaining connections
to isolated etcd members, the API server provides the same level of guarantee through
its health checks, which fail if it cannot connect to etcd member.  Therefore,
the WatchFromStorageWithoutResourceVersion feature gate can be deprecated and removed.

Kubernetes-commit: 065bf2004d27e5e3f1be3c0f128347d4060d8954
2025-01-31 11:49:28 +01:00
Abhishek Kr Srivastav 55da1afddb Additional timeout to receive all watchEvents
Kubernetes-commit: f6b527cb54e37513bbe60edb52890f3de481d000
2025-01-31 10:19:19 +05:30
Davanum Srinivas 0a703e3517 Linter to ensure go-cmp/cmp is used ONLY in tests
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 4e05bc20db99ff89b2d2205218d24b9935a7fdd7
2025-01-24 17:03:29 -05:00
张可10140699 e802cf6daf remove duplicate getAttrsFunc calls to reduce temporary memory allocations
Kubernetes-commit: 479ff5a02b026caec40e8262785e8ffffb42085a
2025-01-15 10:15:02 +08:00
Marek Siarkowicz a6c0914bb9 Only test requests that pass validation
Kubernetes-commit: 1b2bacda5bd978b68a6dc704606495b29b181690
2025-01-09 12:55:45 +01:00
Marek Siarkowicz 74be087390 Extract and unify cache bypass logic by creating a CacheProxy struct
Kubernetes-commit: 4a4fc9da801f299176c7200e66224aa79b1c0817
2024-12-31 14:04:00 +01:00
Marek Siarkowicz b43177846d Refactor shouldDelegateList
Kubernetes-commit: e5a3bdb3a71575af0d165e8b08cfaba7d572b802
2024-12-31 11:57:43 +01:00
Marek Siarkowicz 3c47ed7b1d Test all possible combinations of input for shouldDelegateList
Kubernetes-commit: fe895563d92f55068c6090e29dfbd21291b203d8
2024-12-31 11:42:28 +01:00
Marek Siarkowicz 8161d73803 Add benchmarking of namespace index
Kubernetes-commit: 13a21d5854855671ca0256e39b1657dacd301371
2024-11-05 10:32:59 +01:00
Marek Siarkowicz fd21d18170 Improve benchmark to handle multiple dimensions
Kubernetes-commit: 4a0578e3dee093aec23e16556ac8fb8642060362
2024-11-05 10:32:59 +01:00
Marek Siarkowicz 62c90b1dff Extract list response struct to manage all the response fields
Kubernetes-commit: 78a6402755905f14d72ee47fdb1e169dbdaa6853
2024-11-24 13:10:17 +01:00
Alvaro Aleman 84b3c4c640 Use generic btree in watchcache
This change makes us use the generic btree available in newer versions
of github.com/google/btree. This avoids a bunch of type assertions and
makes the code easier to read.

Kubernetes-commit: b1cb471982b74c13c26dbcc0f4e1b5ae92ea47e6
2024-11-19 22:04:08 -05:00
Antoni Zawodny 0dcf3e9d26 Configure watch cache history window based on request timeout
Kubernetes-commit: 4a2b7ee5699331df31b7483be082c201a1e7f51f
2024-12-13 15:40:03 +01:00
Patrick Ohly b84662911c remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".

Kubernetes-commit: 8a908e0c0bd96a3455edf7e3b5f5af90564e65b0
2024-12-02 14:43:58 +01:00
Abu Kashem fbb5ab0d70 handle watch for unsafe delete
Kubernetes-commit: 25efc8f2d136a9574166be02789ac727c5b4a3fd
2024-11-05 20:36:56 -05:00
Abu Kashem 1f27993c44 implement unsafe deletion, and wire it
- implement unsafe deletion, and wire it
- aggregate corrupt object error(s) from the storage LIST operation
- extend storage error:
a) add a new type ErrCodeCorruptObj to represent a corrupt object:
b) add a new member 'InnerErr error' to StorageError to hold
   the inner error
- add API status error

Kubernetes-commit: 5d4b4a160dc551dc8979012eeabea1a098945603
2024-09-20 17:36:27 -04:00
Marek Siarkowicz e85d45c0a4 Use btree for watch cache storage to serve LIST more efficiently
Can be disabled via BtreeWatchCache feature flag.

Kubernetes-commit: 5ea427ebb508ce2871d4d0f9869959275c0d3bce
2024-08-17 11:01:41 +02:00
Wojciech Tyczyński 0679efd5ba Fix TestCacherDontMissEventsOnReinitialization test
Kubernetes-commit: d35ea217fa7541a2b1942aaf533697a2e4e7a222
2024-10-31 12:33:04 +01:00
Marek Siarkowicz 518e8ed25c Adding tests for using indexers in tests
Kubernetes-commit: 711772a1e15288d813a830780317a134df9acb5c
2024-08-22 20:04:37 +02:00
Marek Siarkowicz 5913dac984 Implement btree based storage indexer
Kubernetes-commit: 50d2fab27903c66837d625b6ff702cf7873e3c7f
2024-10-24 18:17:56 +02:00
Antonio Ojea 81796a85a6 use same name for package than the folder
Kubernetes-commit: aa7d0b00944958c9898bace86f5bc77cdcba24c9
2024-10-16 10:38:57 +00:00
Marek Siarkowicz eb7f648085 Migrate GetList to Kubernetes client
Kubernetes-commit: a16a364324c218b703d033edf89187aa60d9dd87
2024-05-31 14:36:22 +02:00
Marek Siarkowicz de27d754e6 Migrate Count to Kubernetes client
Kubernetes-commit: e192ac31a425e186230285829947df3854d08125
2024-05-31 11:08:48 +02:00
Marek Siarkowicz fd6565d201 Migrate Delete and GuaranteedUpdate to Kubernetes client
Kubernetes-commit: 2fcd321c426d2567e74b97da38b4860638385007
2024-05-31 11:07:38 +02:00
Marek Siarkowicz fc6b2587cc Migrate Create to Kubernetes client
Kubernetes-commit: 53ca81da29511596cac0301e7a4f527309d380e3
2024-05-31 10:57:41 +02:00
Marek Siarkowicz 187d1ad94a Migrate Get to Kubernetes client
Kubernetes-commit: 092a6d1e0d9f91d543369f40a1fb65e9c3bff034
2024-05-31 10:54:49 +02:00
Marek Siarkowicz 37f422396a Update recorders to wrap kubernetes.Client
Kubernetes-commit: 066c1c05d73690b48c872f3fbc23b7722cd44fe3
2024-07-05 14:19:49 +02:00
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