Lukasz Szaszkiewicz
816c9a3d12
apiserver/storage: improve RunWatchSemanticInitialEventsExtended test
...
changes the test to populate the underlying data store with
more data to trigger potential ordering issues.
Kubernetes-commit: 20ded275705a6e11c1113cbeedad4de94e2dc666
2024-01-10 11:08:35 +01:00
Wojciech Tyczyński
45b7f21179
Ensure that initial events are sorted for WatchList
...
Kubernetes-commit: 92bdc7b3873800e6130176e49acdf5e17110e5b9
2023-09-26 18:39:44 +02:00
Lukasz Szaszkiewicz
e53bac21d8
storage/watch_cache: rework getAllEventsSinceLocked
...
Kubernetes-commit: ecaf2093f51fed5f544520b0ac00fb33a474b7f5
2024-02-26 12:22:05 +01:00
Lukasz Szaszkiewicz
19bd56380e
storage/cacher: add TestGetWatchCacheResourceVersion, TestGetBookmarkAfterResourceVersionLockedFunc
...
Kubernetes-commit: d629d3fa355ec90f618663b0933d28d335489c54
2024-02-21 10:06:42 +01:00
Lukasz Szaszkiewicz
76172aaa1f
storage/cacher: ensure the cache is at the Most Recent ResourceVersion when streaming was requested
...
Kubernetes-commit: f90bcf649e0f3dc233f49882468f949b0f00ac4f
2024-01-17 14:10:04 +01:00
Han Kang
f615696539
bump the stability level of apiserver_storage_size_bytes to STABLE
...
Kubernetes-commit: f38852768e312fe7b9775b92f7228371a0a96f90
2024-02-16 09:13:46 -08:00
HirazawaUi
bc8676d59a
Add decoding time to the audit log
...
Kubernetes-commit: 20fe2a3539e90f7554f94359ac3b4058a5bbb363
2023-10-25 22:52:11 +08:00
Lukasz Szaszkiewicz
ca8d0aaf91
client-go/reflector: make UseWatchList a pointer
...
until #115478(use streaming against the etcd storage)
is resolved the cacher need a way to disable the streaming.
Kubernetes-commit: 41e706600aea7468f486150d951d3b8948ce89d5
2024-01-19 13:48:29 +01:00
weilaaa
febd537a31
use build-in max and min func to instead of k8s.io/utils/integer funcs
...
Kubernetes-commit: eb8f3f194fed16484162aebdaab69168e02f8cb4
2023-12-15 15:09:11 +08:00
James Blair
b6487a8ac1
Fix etcd repository path to prevent redirects.
...
Signed-off-by: James Blair <mail@jamesblair.net>
Kubernetes-commit: b6c1f8ef08c3451f17048447e107c509a8ed950e
2023-11-02 09:31:37 +13:00
Wojciech Tyczyński
2b59a3f14c
Don't sort under lock
...
Kubernetes-commit: 3e1dbccf4d3de59b31596f1664ff5ac9c02d1eea
2023-11-23 18:13:43 +01:00
Robert Svarinskis
fdd26489db
Fix etcd storage_events_received_total metric not being registered
...
Kubernetes-commit: ceb7ca93875cd74bea60500812cf7f024d3b1f2d
2023-12-04 09:12:21 +00:00
ahutsunshine
16536b9b63
support pod namespace indexer
...
fix comments
optimize code
small optimization for the namespace scope check
Kubernetes-commit: d8bd150784bb4825ae891dd0ec84625bdba0f2b8
2023-11-29 15:51:24 +08:00
HirazawaUi
88cd5253fa
make the decode function respect the timeout context
...
Kubernetes-commit: 3fb16abfca43f53048a28758f2366cb52e31d2b7
2023-11-08 23:39:10 +08:00
Siyuan Zhang
cef6db2cfb
k8s.io/apiserver/storage/etcd: refactor etcd GetList.
...
Extract the logic to determine withRev to a separate method for better readability.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
Kubernetes-commit: 624169c5b50ee8a6e9a761e9488134985334817e
2023-10-20 12:59:46 -07:00
Lukasz Szaszkiewicz
7c5f6db7bf
cacher: when forgeting a watcher, call stopWatcherLocked multiple times
...
It's possible that the watcher is already not in the structure (e.g. in case of
simultaneous Stop() and terminateAllWatchers(), but it is safe to call stopLocked()
on a watcher multiple times.
Kubernetes-commit: 7e35823690df01bd019a88d3346bd3ac820afaca
2023-10-30 14:24:39 +01:00
Antonio Ojea
bdad50b280
Revert "cacher: when forgeting a watcher, call stopWatcherLocked multiple times"
...
This reverts commit bbca4a4b9add0f6c58e132500fd89dd39ee077f4.
Kubernetes-commit: c2cb3209138d852520da2743b9bd3a9795b2b7fb
2023-10-31 15:28:01 +00:00
Wojciech Tyczynski
6caf326620
Revert "Make the decode function respect the timeout context"
...
Kubernetes-commit: 98a2f22e740ccd2c30711f1b21d6383f1b91595e
2023-10-31 16:27:17 +01:00
Lukasz Szaszkiewicz
3f81d0cca7
cacher: when forgeting a watcher, call stopWatcherLocked multiple times
...
It's possible that the watcher is already not in the structure (e.g. in case of
simultaneous Stop() and terminateAllWatchers(), but it is safe to call stopLocked()
on a watcher multiple times.
Kubernetes-commit: bbca4a4b9add0f6c58e132500fd89dd39ee077f4
2023-10-30 14:24:39 +01:00
Siyuan Zhang
ef409f941b
k8s.io/apiserver/storage/etcd: refactor etcd GetList.
...
Reorder some code.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
Kubernetes-commit: a968f51fa2f87ed57f9e48ba436e11421c403b27
2023-10-20 12:39:51 -07:00
Siyuan Zhang
49886c205c
k8s.io/apiserver/storage/etcd: refactor etcd GetList.
...
reduce redundant update of withRev after request.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
Kubernetes-commit: 84ec5e2eccbc07b17f3b3e3e00dc3996105e0346
2023-10-20 12:06:46 -07:00
HirazawaUi
be73f76247
Make the decode function respect the timeout context
...
Kubernetes-commit: f78b367db6393a449b8f456e725cbe155d9b90e6
2023-10-25 23:12:16 +08:00
Nilekh Chaudhari
f0fe5d558c
chore: updates api doc
...
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>
Kubernetes-commit: d3de47ceeedd1fae3f3c95595186a028002526d6
2023-10-17 22:17:43 +00:00
Rita Zhang
26219aabef
[KMSv2] promote KMSv2 and KMSv2KDF to GA
...
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
Kubernetes-commit: a9b1adbafc7fe52f669dc98aada21bc3e46cdce3
2023-10-24 09:50:45 -07:00
Anish Ramasekar
bfdac7f8f4
[KMSv2] Add tracing
...
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
Kubernetes-commit: 8d3a25c7c98d77419111a02917f459aab8970087
2023-10-09 23:43:46 +00:00
Wojciech Tyczyński
324d2bc3cf
Cleanup paging parameters in etcd3 store
...
Kubernetes-commit: 3f4d3b67682335db510f85deb65b322127a3a0a1
2023-10-20 15:38:59 +02:00
Wojciech Tyczyński
5bf4f58ab8
Remove storageConfig.Paging parameter
...
Kubernetes-commit: b386120da239bf9652fc02b2d2cbbd0fcc3cd121
2023-10-20 15:35:58 +02:00
tao.yang
47998d1ee6
cleanup: omit comparison with bool constants
...
Signed-off-by: tao.yang <tao.yang@daocloud.io>
Kubernetes-commit: b35357b6c08f21ba0fd312536051394c2567ec79
2023-09-04 16:59:23 +08:00
machine424
340fd67b3a
storage/etcd3/metrics: add unit test for apiserver_storage_objects
...
Kubernetes-commit: a96b97e40c0837f727c8e6d42f021b66922bb26c
2023-09-22 16:12:40 +02:00
Siyuan Zhang
77032c52b8
k8s.io/apiserver/storage: add 3 new unit tests for delete.
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
Kubernetes-commit: 26a4e06c92c248748dd3c50c74d75f8adc3c6823
2023-10-11 10:38:01 -07:00
Siyuan Zhang
70af178d56
k8s.io/apiserver/storage: add a new TestCreate case.
...
Add a test case of create with rv set.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
Kubernetes-commit: 2f923e356e042d9dce88e8f78abf30f414051e71
2023-10-11 10:24:31 -07:00
Siyuan Zhang
a0dede6875
k8s.io/apiserver/storage: add some ResourceVersion validation in GetList unit tests
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
Kubernetes-commit: baac8bb573c8efb314b037f4fbac116556c03c83
2023-10-11 10:46:30 -07:00
Siyuan Zhang
e15d4d2e0b
k8s.io/apiserver/storage/etcd: refactor getCurrentState.
...
Extract getCurrentState as a separate method that can be reused.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
Kubernetes-commit: ebca5d438d9cb2c82d0b99dbcb0aeca8879db441
2023-10-11 09:56:07 -07:00
Lukasz Szaszkiewicz
db34e9b7c7
storage/util: introduce HasInitialEventsEndBookmarkAnnotation
...
Kubernetes-commit: 70ae9c441cee9d78a88c0526592796ac4f491096
2023-09-18 11:39:08 +02:00
Lukasz Szaszkiewicz
90ba08909c
storage/etcd: the watcher supports the API streaming
...
Kubernetes-commit: ca562fd280a9dd5db952eb8c14b93fcf6668cc49
2023-08-22 14:02:39 +02:00
Lukasz Szaszkiewicz
e7424d8207
storage/testing/watcher_tests: add new flavour to RunWatchSemantics test and fill the gap
...
the new flavour proves that a storage layer follows RV
which is equal to the global rv
Kubernetes-commit: 0e238c4c28f11d1ec7cf5f506c81195c1cc463fe
2023-09-22 09:32:23 +02:00
Lukasz Szaszkiewicz
f0dfb17949
storage/testing/watcher_tests: refactor RunWatchSemantics tests
...
Kubernetes-commit: dc5cfe3cff289ecb97153716bfd5817579d00fb3
2023-09-21 12:16:16 +02:00
Lukasz Szaszkiewicz
c8dcfeed34
storage/testing/watcher_tests: make TestCacherWatchSemantics storage agnostic
...
Kubernetes-commit: 91bb75883c613d45563f3b7c01a69dde8194bfdc
2023-09-15 12:28:36 +02:00
Lukasz Szaszkiewicz
c13e210d56
storage/testing/watcher_tests: move TestCacherWatchSemantics (no-op)
...
Kubernetes-commit: afbb1a6ef98b548b9e57b168614ca6e15fd0034c
2023-09-14 11:19:36 +02:00
Lukasz Szaszkiewicz
3c3bb86696
storage/testing/utils: add helper functions
...
Kubernetes-commit: 3a96baf3fa8e837159b27b98b05c5024143b06a3
2023-09-15 12:26:11 +02:00
Lukasz Szaszkiewicz
fe7ae035ef
storage/etcd3/watcher_test: refactor TestWatchErrorWhenNoNewFunc to a table test
...
Kubernetes-commit: 4b60c18183f11207d0cb2d89bf28090156222c61
2023-09-19 10:35:09 +02:00
Lukasz Szaszkiewicz
f5adfca95e
storage/testing: a simple refactor
...
Kubernetes-commit: 39af594f312ad46715dfb705d71ad4e607e27e5d
2023-09-14 11:16:10 +02:00
machine424
98d028d0d0
clarify the description of the metric apiserver_storage_objects
...
Kubernetes-commit: 084deb7a7cf147bbafd131ab1a36852a79f08a64
2023-09-12 11:16:36 +02:00
Rita Zhang
2bed5d11d9
kmsv2: add apiserver identity to metrics
...
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
Kubernetes-commit: 43ccf6c4e8f173d981edebb6146c58b523fc21b7
2023-09-05 13:03:18 -07:00
Monis Khan
87aad93082
kmsv2: add legacy data integration test
...
Signed-off-by: Monis Khan <mok@microsoft.com>
Kubernetes-commit: 95121fe846f875c4f3feb2b1bf42a9553566f097
2023-09-01 11:21:38 -04:00
Monis Khan
49c6151dee
kmsv2: fix race in simpleCache.set when setting cache size metric
...
Signed-off-by: Monis Khan <mok@microsoft.com>
Kubernetes-commit: b10697c7880848d7ec110fd6b3e67015bbe74fa8
2023-08-27 15:14:04 -04:00
Lukasz Szaszkiewicz
957c305d94
storage/etcd: add TestWatchDispatchBookmarkEvents unit test
...
Kubernetes-commit: 875b00137fdfbc74756a0fc5b1c9b2adbeb78e55
2023-09-01 13:45:44 +02:00
Lukasz Szaszkiewicz
51e79bdd97
storage: document ProgressNotify from storage.ListOptions
...
At first glance, it seems that the fields storage.ListOptions.ProgressNotify and storage.ListOptions.Predicate.AllowWatchBookmarks
are the same. Unfortunately, this is not the case.
This PR documents the differences and motivations for why these fields are actually distinct.
Kubernetes-commit: 6058540f3d0edc405a1f1b8a96bd82ceca99c240
2023-09-01 10:48:36 +02:00
Marek Siarkowicz
8b7824a7e8
Avoid creating local variables that don't change
...
Having local variables gives false impression that this is overwritten
in the function block.
Kubernetes-commit: e01bd641447a315e28fab8148e99ac6afba9bcd7
2023-08-30 16:51:40 +02:00
Marek Siarkowicz
90adbb75eb
Flatten switch case
...
Kubernetes-commit: 10553a1966892e305252c65ebeb9043416304f48
2023-08-30 16:42:34 +02:00