Commit Graph

71 Commits

Author SHA1 Message Date
Wojciech Tyczyński 299c158ba3 Reuse generic List test for watchcache
Kubernetes-commit: ef8c4fbca8e5bed1e7edc162b95c412a7f1a758e
2022-11-04 22:01:37 +01:00
Tim Allclair 3268b0561b Validate etcd paths
Kubernetes-commit: f1693a02c46f79f8c90a4ef17c4a750034f21484
2022-10-10 18:15:22 -07:00
Wojciech Tyczyński c51bbc3183 Parallelize tests cases in some storage tests
Kubernetes-commit: 6d85f947bf86d12e4459d31029c41d6049d40c0e
2022-11-04 10:23:40 +01:00
Wojciech Tyczyński 44c802979e Reuse generic ListNonRecurisve test for cacher
Kubernetes-commit: e301306d89a69ff1a328a4ae3fa39a9e3deb022e
2022-11-03 14:58:34 +01:00
Wojciech Tyczyński c38aa93533 Reuse generic TestGet in cache tests.
Kubernetes-commit: 75a1ef87b32213a7d3d1c2027dd515e4f74c1777
2022-10-27 16:00:30 +02:00
Monis Khan 8d68e6f323 Load encryption config once
This change updates the API server code to load the encryption
config once at start up instead of multiple times.  Previously the
code would set up the storage transformers and the etcd healthz
checks in separate parse steps.  This is problematic for KMS v2 key
ID based staleness checks which need to be able to assert that the
API server has a single view into the KMS plugin's current key ID.

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

Kubernetes-commit: f507bc255382b2e2095351053bc17e74f7100d35
2022-08-29 17:25:48 -04:00
Andy Goldstein ecf3a57374 watch cache: log GroupResource, not objectType
All CustomResources are treated as *unstructured.Unstructured, leading
the watch cache to log anything related to CRs as Unstructured. This
change uses the schema.GroupResource instead of object type for all type
related log messages in the watch cache, resulting in distinct output
for each CR type.

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

Kubernetes-commit: 397533a4c2df9639ff4422c907d06fae195a1835
2022-08-11 15:45:04 -04:00
Steve Kuznetsov 80256820ce storage: move the APIObjectVersioner definition to storage
The means by which we extract and parse the version of an API object is
not specific to etcd3. In order to allow for a generic suite of tests
against any storage.Interface imlpementation, we need this logic to live
outside of the etcd3 package, or import cycles will exist.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: 3939f3003e9605c06f65e64d1fc6f94b294f9d97
2022-05-11 07:44:21 -07:00
Wojciech Tyczyński b028a2ea8d Unify merge GetToList and List storage methods to single GetList
Kubernetes-commit: f3d56369f71f5106eeec8300e77bd69b172733da
2022-02-10 10:15:29 +01:00
Wojciech Tyczyński 9f8f72fea9 Change storage.Interface to utilize recurisve parameter
Kubernetes-commit: 3016b3d8f868a3041c7cb86695de09d7ab27cf3b
2022-02-10 09:58:31 +01:00
Wojciech Tyczyński b4935b065f Slightly improve reliability of storage List tests.
Kubernetes-commit: 8ca6c5922b9a0bafa8c83617d6930b981430334e
2021-12-10 12:05:32 +01:00
Wojciech Tyczyński 71bfcaaea1 Simplify storage.Interface by merging Watch and WatchList functions.
Kubernetes-commit: 53653e9b0a7145c3b6e133c5639194ff79b3719d
2021-11-18 12:40:26 +01:00
wojtekt b898581360 Migrate to k8s.io/utils/clock in apiserver
Kubernetes-commit: 859a98c0358610e2c127cd2fba1be601ca975188
2021-09-14 20:36:07 +02:00
Mike Spreitzer 31ec50ec43 Plumb the schema.GroupResource into etcd3 Store struct
Kubernetes-commit: 6f8019aae95db85552381f7e7066a52fef61be7a
2021-09-13 16:54:34 -04:00
tiloso ab3cca3647 Fix staticcheck in apiserver and client-go pkgs
Kubernetes-commit: 830a137d2ea70663cd94403595313b95ac40ffe8
2021-06-19 22:03:46 +02:00
Ling Samuel bd7da186cc apiserver add metric etcd_lease_object_counts
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>

Kubernetes-commit: 7e9fe39cd7c3ee67fcc29e6ca0836917c5a4e9e1
2020-12-07 10:45:44 +08:00
wojtekt 8c25869e43 Add suggestion to storage interface Delete method
Kubernetes-commit: c2d61896f45967cdea15072b7a12faeb635b5dc5
2020-11-03 13:21:00 +01:00
Ling Samuel f673ce24f7 apiserver add --lease-reuse-duration-seconds to config lease reuse duration
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>

Kubernetes-commit: c99567005db15d220f2b792e98af735c5aa24f6e
2020-12-02 17:35:10 +08:00
wojtekt 649d11a350 Fix TestStartingResourceVersion flakiness
Kubernetes-commit: 37b0004978ebc77838c1a83cf5211f5216e7b3b4
2020-11-18 08:36:05 +01:00
wojtekt 942f220e85 Remove variadic argument from storage interface
Kubernetes-commit: 8b98305858b107369f2c9b9fd8ef1c5b0da078c0
2020-11-02 15:52:51 +01:00
Daniel Smith 7e305c53b5 fix goroutine that lives too long
Kubernetes-commit: 9a2e0fcb18bc9feb327122edc95a968a8d423af7
2020-09-28 10:50:47 -07:00
wojtekt a5000473c1 Pipe newFunc to etcd3 storage layer
Kubernetes-commit: fbd65a265a47ffe081aaac2f794a55034333d11d
2020-08-31 11:58:45 +02:00
gongguan 5dbb27a1df remove deprecated cacher CacheCapacity config
Kubernetes-commit: 12c838136b09005e0cbc831096643195ef24cb89
2020-06-05 21:34:36 +08:00
gongguan 915ec02699 restore event Gone test
Kubernetes-commit: f3cbfc3f7e4bf38978b118933d4e626125a9d80f
2020-06-16 11:07:07 +08:00
gongguan 1da8aeae17 improve Clock as Cacher Config
Kubernetes-commit: 0f7de876a5e931a57ba6347b81e8e28d360c788a
2020-06-15 23:57:11 +08:00
Joe Betz 5b75cf0ff9 Add GetOptions and ListOptions to storage interface
Kubernetes-commit: 4c99949ae6b4a74e4ffda0caba86c151c23d579e
2020-05-29 10:48:33 -07:00
Wojciech Tyczynski 4589c74d5e Send watch bookmarks every minute
Kubernetes-commit: 9f1e4620379028754f2da4223adf4d1a445e90f4
2020-04-27 18:41:31 +02:00
louisgong 4c8b97679c Use dynamic size watch-cache.
If all cached events occur inside eventFreshDuration, increase cache capacity by 2x.
Decrease cache capacity by 2x when recent half events occur outside eventFreshDuration.

Kubernetes-commit: 56407b656c7acf6039cead0192070429e53a0c70
2020-04-12 17:22:38 +08:00
Joe Betz ee483f99bc Fix watch test to expect Expired instead of Gone
Kubernetes-commit: 57b451cfb6738fca45fc05cd50c1ff6d7240e3a7
2019-11-05 22:06:10 -08:00
Joe Betz 1b75e5416d Use same 'minimum resource version' semantics both when watch cache is enabled and disabled
Kubernetes-commit: 1406f7adf20a9ceaf5b8270ec9a61dd9e450ae8a
2018-12-04 16:55:59 -08:00
Wojciech Tyczynski 20ecceebd3 Cache serializations
Kubernetes-commit: 25a728ae5eb0ae067d21679fad915c0555242470
2019-08-25 09:55:52 +02:00
wojtekt fa23498ce7 Propagate error from creating cacher and storage decorators up
Kubernetes-commit: ee13be28845e8c55f6e2a2207ca4f46cd67fdb4e
2019-07-15 09:34:08 +02:00
wojtekt 9698803236 Move etcd/testing to etcd3/testing
Kubernetes-commit: 7497260e54c555c1fb1def741267f9dc23fe7dce
2019-07-01 10:38:19 +02:00
wojtekt 6d99094b88 Move APIObjectVersioner
Kubernetes-commit: fd819f8fdc2528249efc94c18da434b61fe87925
2019-06-28 13:58:08 +02:00
wojtekt c8fac58c15 Move etcdtest to testing
Kubernetes-commit: 28fa6de62933bfb5d5b7c36db60873a8c8d85dea
2019-06-28 13:36:48 +02:00
wojtekt 01c4fe2028 Cleanup util file
Kubernetes-commit: 762518fd47bb058d11b26c60d9cf9f9a9c5b3c05
2019-06-28 13:30:43 +02:00
Chao Xu 5c9333e4d3 Run deleteValidation at the storage layer so that it will be retried on
conflict.

Adding unit test verify that deleteValidation is retried.

adding e2e test verifying the webhook can intercept configmap and custom
resource deletion, and the existing object is sent via the
admissionreview.OldObject.

update the admission integration test to verify that the existing object
is passed to the deletion admission webhook as oldObject, in case of an
immediate deletion and in case of an update-on-delete.

Kubernetes-commit: 7bb4a3bace048cb9cd93d0221a7bf7c4accbf6be
2019-04-09 13:49:16 -07:00
Andrew Kim ef71315b08 update import of generic featuregate code from k8s.io/apiserver/pkg/util/feature -> k8s.io/component-base/featuregate
Kubernetes-commit: c91913924543e1d29f3f3d51354701df9df75def
2019-03-04 12:46:52 -05:00
fansong.cfs 58fb117373 add watch bookmark
Kubernetes-commit: d70edd3d39d4430d71c4b7c9adba8df5ba7f16c8
2019-03-19 18:16:23 +08:00
Manjunath A Kumatagi 470bc75262 Fix the formatting string
Kubernetes-commit: e9d1a90535e6afd32a65c6a99222229a8d9e8665
2019-04-07 12:01:07 +05:30
Joe Betz f90442e3fb Paginate List call performed by Reflector's ListAndWatch call
Kubernetes-commit: 84723c2d3ef5ff5d30aadd1ad72068bf2254358c
2019-03-14 13:26:19 -07:00
fansong.cfs 9130ee52b5 Refactor watchcache to support bookmark
Kubernetes-commit: b29e69c1562f66cf339ae7cd58979528791f035f
2019-03-29 17:49:15 +08:00
Jordan Liggitt 80029a760c Deprecate and remove use of alpha metadata.initializers field, remove IncludeUninitialized options
Kubernetes-commit: 17aa60686ebe5fd04b4fe6f442dc36a8d70b6730
2019-01-17 09:19:28 -05:00
David Eads cb5cac48ee make package name match all the import aliases
Kubernetes-commit: d3bd0eb1d5cefc25e4476d8dc086ebd90439ef4e
2018-08-01 10:01:32 -04:00
Mikhail Mazurskiy 0f7bbcadfb Add missing error handling in schema-related code
Kubernetes-commit: bfe313d5f351dfae086a85a97e7103183173e5b5
2018-06-03 14:59:58 +10:00
fisherxu 9ffd3e56ff move cacher in separate dir
Kubernetes-commit: dbb448bbdcb9e440eee57024ffa5f1698956a054
2018-05-30 20:44:31 +08:00
fisherxu dd4ba939ef collapse the resource version parse
Kubernetes-commit: 68ec856b4506d4440b327141051bdf31fc92be42
2018-06-23 17:29:06 +08:00
wojtekt 5d15c5549a Fix incorrectly set resource version in List
Kubernetes-commit: a3578c864ed7db5a73daa88839eed11d86af209b
2018-05-22 15:32:25 +02:00
hzxuzhonghu 6ab99203b7 Replace "golang.org/x/net/context" with "context"
Kubernetes-commit: 70e45eccf27726f0e63dd1024924ccc7e2cd35a0
2018-02-28 12:20:22 +08:00
Kubernetes Publisher 627fa76a8b sync: initially remove files BUILD */BUILD BUILD.bazel */BUILD.bazel 2018-03-15 09:38:17 +00:00