Wojciech Tyczyński
8cd19efa73
Fix inconsistency in returning list results both in etcd3 and watchcache
...
Kubernetes-commit: da8d197a7205c01fdf376246995b0a1b3ab53859
2022-11-08 11:47:28 +01:00
Tim Allclair
3268b0561b
Validate etcd paths
...
Kubernetes-commit: f1693a02c46f79f8c90a4ef17c4a750034f21484
2022-10-10 18:15:22 -07:00
Wojciech Tyczyński
07db92af49
Fix setting resource version on deletion
...
Kubernetes-commit: bbcf5e38776f2b18026539a0fbcf3aa505386c1f
2022-10-26 21:37:19 +02:00
Wojciech Tyczyński
499bbb88dc
Refactor WatchError test to make it generic
...
Kubernetes-commit: b3f9272d57a71a9c50b38754b7309ddf68adb93f
2022-10-28 11:35:58 +02:00
David Ashpole
aa161f2fc0
migrate apiserver utiltrace usage to component-base/tracing
...
Kubernetes-commit: de26b9023f2872c5cd7e15fad5dd5ab649222c13
2022-10-20 18:15:38 +00:00
Tim Allclair
bd7c7f52c2
Consolidate AuditContext
...
Kubernetes-commit: f1d684b7b60b39b7dc1eb4156307c593f0ba74e1
2022-07-12 11:53:57 -07:00
viveksahu26
6cb2fda0ab
fix warnings or linter errors
...
Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>
Kubernetes-commit: 386bc4a7fa3e975cb247d300fdc5ad1b14a15605
2022-09-05 19:10:43 +05:30
Andy Goldstein
8587d29223
etcd3: include GroupResource in logs/metrics
...
Use GroupResource instead of object reflection when recording the
following metrics:
- etcd_request_duration_seconds
- etcd_bookmark_counts
Add GroupResource to logs and traces where only reflection-based typing
was previously used.
Both of these changes allow us to disginguish between different CRDs,
all of which are represented as *unstructured.Unstructured.
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
Kubernetes-commit: 305fa2add60ad507417304d865f001006d5175fe
2022-08-25 13:55:55 -04:00
Artur Żyliński
e34c622d49
Add audit-id to storage traces
...
Refactor GetAuditIDTruncated to use context instead of request
Kubernetes-commit: b1e12b01b6c578da3eb593805b48e9d4a69efe54
2022-06-20 17:09:32 +02:00
Abirdcfly
6be1a93b55
fix: --chunk-size with selector returns missing result
...
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
Kubernetes-commit: fba297629d82866078faa6dc076cb5f81633e557
2022-06-20 00:54:57 +08:00
Steve Kuznetsov
67344c728d
storage: move continue token definition to storage
...
The means by which we encode and decode the continue token during a
paginated LIST call is not specific to etcd3. In order to allow for a
generic suite of tests against any storage.Interface implementation, 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: eb3aa5be10393968d8083c79f5958501fc029e8d
2022-05-11 07:52:02 -07: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
Maciej Borsz
17c48c0f65
Improve Create/Update/Patch traces.
...
Kubernetes-commit: 56769e794b757c541d1c7fef36a5507e52e3e7b2
2022-04-20 07:30:12 +00:00
Steve Kuznetsov
d96402b9d6
storage/etcd3: clarify the pagingation flow in LIST
...
It is not possible for the nil-check to ever return anything different
from what the explicit boolean used to, but this is only something that
a reader can come to the conclusion on if they very, very carefuly read
the code. Instead of having this implicit flow that is difficult to
follow, let's keep the boolean.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Kubernetes-commit: 809fd64b289add1b378b45c748c23b7278c366f1
2022-04-22 11:50:24 -07:00
Sanskar Jaiswal
d1bd5277fb
Update comment and declaration of `storage.GuaranteedUpdate` to be clearer.
...
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Kubernetes-commit: f8df26ae803103f82edbf1efe17b1b169801b256
2022-04-16 17:19:06 +05:30
Maciej Borsz
f4edb394b0
Implement page size progressing for rare selectors.
...
Kubernetes-commit: a2ad9f9e4aba6aae6657a3189bdced6dbc8ba4b5
2022-03-07 15:44:59 +00: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
Steve Kuznetsov
af1cb1cefe
storage: transformers: pass a context.Context
...
When an envelope transformer calls out to KMS (for instance), it will be
very helpful to pass a `context.Context` to allow for cancellation. This
patch does that, while passing the previously-expected additional data
via a context value.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Kubernetes-commit: 27312feb9983c18d1daf00afba788727d024cdd0
2022-02-17 07:29:44 -08:00
Wojciech Tyczyński
a55c2c834e
Unify List and GetToList functions of etcd3
...
Kubernetes-commit: 27db8e34cfc930972beb8b5a33c443e134bcd614
2021-11-22 13:30:25 +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
Dr. Stefan Schimanski
2f0da0d2ea
apiserver/storage: free etcd kv early in list decoding loop
...
Kubernetes-commit: dbf98e42664c8a3a104fe06e0e362497fca2902d
2021-10-08 14:05:26 +02:00
Mike Spreitzer
889106eff7
Add metrics about handling LIST requests
...
Add metrics that illuminate the costs of handling LIST requests.
Kubernetes-commit: bf424292db185546c474b27b963fd27bdbafc72f
2021-09-01 18:18:23 -04:00
Mike Spreitzer
31ec50ec43
Plumb the schema.GroupResource into etcd3 Store struct
...
Kubernetes-commit: 6f8019aae95db85552381f7e7066a52fef61be7a
2021-09-13 16:54:34 -04:00
Jordan Liggitt
29227fd4ee
Avoid spurious calls to update/delete validation
...
Kubernetes-commit: 561ce035b5b7d577ddb5bb30657bc1f8b399e109
2021-08-05 17:21:40 -04:00
Jordan Liggitt
6365bf9124
Switch to go.etcd.io/etcd/client/v3
...
Kubernetes-commit: 2979c3325e3ac4023dd19c435f3a995074328751
2021-03-23 11:01:52 -04: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
3de94d4883
Unify variable naming between GuaranteedUpdate and Delete in storage
...
Kubernetes-commit: d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
2020-12-16 09:28:44 +01:00
wojtekt
ddcc69d4f7
Use current state from watchcache to avoid etcd get for deletions
...
Kubernetes-commit: 7bab6a9c6ed7d4e54da3e010a7bf0a30786d28f9
2020-11-03 17:30:26 +01: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
942f220e85
Remove variadic argument from storage interface
...
Kubernetes-commit: 8b98305858b107369f2c9b9fd8ef1c5b0da078c0
2020-11-02 15:52:51 +01:00
wojtekt
e40efde837
Implement etcd3 progress-notify feature in etcd3 layer
...
Kubernetes-commit: 56e72841b6005740453828a9f4f7a9a1b9a831f6
2020-08-31 12:40:41 +02:00
wojtekt
a5000473c1
Pipe newFunc to etcd3 storage layer
...
Kubernetes-commit: fbd65a265a47ffe081aaac2f794a55034333d11d
2020-08-31 11:58:45 +02:00
Abu Kashem
bd49a32a3f
count of etcd object should be limited to the specified resource
...
Currently count includes keys from different resource(s) if the keys
are a prefix of the specified resource/key.
Consider the following keys:
A: <storage-prefix>//foo.bar.io/machines
B: <storage-prefix>//foo.bar.io/machinesets
If we ask for the count of key A, the result will also include the
keys from key B since key B shares the same prefix as key A.
Append a separator to mark the end of the key, this will exclude all
other keys from a different resource that is a prefix of the specified
key.
Kubernetes-commit: 7e445867aa4d37a67591faf6e5508abaea69d216
2020-09-11 17:07:09 -04:00
wojtekt
6e6045833c
Fix bug for inconsistent lists served from etcd
...
Kubernetes-commit: a5b60c352d4457d96a90ddf1479f0833ef36f7d4
2020-08-14 14:51:56 +02:00
Joe Betz
97937c66f2
Revert nested trace PR#88936
...
Kubernetes-commit: 02cf58102a61b6d1e021e256381ff750573ce55d
2020-07-20 09:55:05 -07:00
Joe Betz
7a467399ac
Enable nested tracing, add request filter chain tracing incl. authn/authz tracing
...
Kubernetes-commit: b12ac0abc64adb71d97fbde12f373b1424631f20
2020-03-06 16:11:21 -08:00
Joe Betz
ee219411ed
Add ResourceVersionMatch parameter to make Resource Version semantics consistent for list
...
Kubernetes-commit: e214f2408b59c745c199645547948a8ad2a87ac2
2020-05-29 10:44:26 -07:00
Joe Betz
5b75cf0ff9
Add GetOptions and ListOptions to storage interface
...
Kubernetes-commit: 4c99949ae6b4a74e4ffda0caba86c151c23d579e
2020-05-29 10:48:33 -07:00
Davanum Srinivas
5879417a28
switch over k/k to use klog v2
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Kubernetes-commit: 442a69c3bdf6fe8e525b05887e57d89db1e2f3a5
2020-04-17 15:25:06 -04:00
Jordan Liggitt
1a93b794ed
Preserve target apiVersion when decoding into unstructured lists
...
Kubernetes-commit: fa12441ab99cac81b0034208fd10d8a4fc3d5bd0
2020-03-10 03:13:20 -04:00
Wenjia Zhang
41da2ced4c
Replace github.com/coreos/etcd by go.etcd.io/etcd
...
Kubernetes-commit: 3b274fad2a719dc1fd0eaef6c55a0d344db10242
2019-10-15 22:38:43 -07: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
Haowei Cai
a0989eba0f
in GuaranteedUpdate, retry on precondition check failure if we are working with cached data
...
Kubernetes-commit: 88f0be6e59aa56570deaa2a9163d0eb3a3ae20f8
2019-09-03 17:26:39 -07:00
Jordan Liggitt
0c706a033c
Plumb context to admission Admit/Validate
...
Kubernetes-commit: 61774cd7176cae0c0324d23ab20e6c6b3038153f
2019-08-19 10:48:08 -04:00
Joe Betz
f103fcda51
Replace string concatination with trace fields
...
Kubernetes-commit: 46a04d50af78e01d06a9879d62cc71fbe892076f
2019-08-02 23:47:24 -07:00
Ted Yu
de3970c505
Revert Provide resource version in error if available
...
Kubernetes-commit: 58b0a2769a57bc190eb5b2a424582270720b325a
2019-07-08 14:33:37 -07:00
Ted Yu
50569df906
Provide resource version in error if available
...
Kubernetes-commit: 6459b61bca8ea8d02ccd1771288345af498ae176
2019-07-06 00:59:20 -07:00
caohe
ac25e63a3e
Remove panic in storage and add log
...
Signed-off-by: caohe <caohe9603@gmail.com>
Kubernetes-commit: 99365063bac66b0cb9f2c3f7322e48b8cb3a0cf7
2019-07-06 17:01:20 +08:00