Skip to content

Commit 5aea363

Browse files
authored
Merge pull request #5383 from wojtek-t/watchlist_second_beta
Update watch-list KEP for next Beta targeted 1.34
2 parents b4738e0 + bb9b0fa commit 5aea363

File tree

2 files changed

+27
-13
lines changed

2 files changed

+27
-13
lines changed

keps/sig-api-machinery/3157-watch-list/README.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ tags, and then generate with `hack/update-toc.sh`.
102102
- [Alpha](#alpha)
103103
- [Beta](#beta)
104104
- [Beta2](#beta2)
105+
- [Beta3](#beta3)
105106
- [GA](#ga)
106107
- [Post-GA](#post-ga)
107108
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
@@ -277,8 +278,8 @@ The rough idea/plan is as follows:
277278

278279
- step 1: change the informers to establish a WATCH request with a new query parameter instead of a LIST request.
279280
- step 2: upon receiving the request from an informer, compute the RV at which the result should be returned (possibly contacting etcd if consistent read was requested). It will be used to make sure the watch cache has seen objects up to the received RV. This step is necessary and ensures we will meet the consistency requirements of the request.
281+
- step 2a: wait until watch catches up with the computed RV
280282
- step 2a: send all objects currently stored in memory for the given resource type.
281-
- step 2b: propagate any updates that might have happened meanwhile until the watch cache catches up to the latest RV received in step 2.
282283
- step 2c: send a bookmark event to the informer with the given RV.
283284
- step 3: listen for further events using the request from step 1.
284285

@@ -342,15 +343,15 @@ Whereas further down in this section we provided a detailed description of each
342343
</tr>
343344
<tr>
344345
<th>2a.</th>
345-
<th>The watch cache starts streaming initial data it already has in memory.</th>
346+
<th>The watch cache waits until is observed the requested ResourceVersion.</th>
346347
</tr>
347348
<tr>
348349
<th>2b.</th>
349-
<th>The watch cache waits until it has observed data up to the RV received in step 2. Streaming all new data (if any) to the reflector immediately.</th>
350+
<th>The watch cache stream all the contents from its in-memory store.</th>
350351
</tr>
351352
<tr>
352353
<th>2c.</th>
353-
<th>The watch cache has observed the RV (from step 2) and sends a bookmark event with the given RV to the reflector.</th>
354+
<th>After sending all the objects it sends a bookmark event with the given RV to the reflector.</th>
354355
</tr>
355356
<tr>
356357
<th>3.</th>
@@ -763,16 +764,29 @@ We expect no non-infra related flakes in the last month as a GA graduation crite
763764
- Extend the existing performance tests with a case that adds a large number of small objects.
764765
The current perf test adds a small number of large objects.
765766
The new variant will help catch potential regressions such as https://github.com/kubernetes/kubernetes/issues/129467
766-
767767

768-
#### GA
768+
#### Beta3
769+
With new concerns brought in 1.33 release timeline, we reviset the approach for the feature.
770+
The discussion happened in [this document] and resulted in the following update for the criteria:
771+
772+
- Revert the client-go changes that use watchList to implement List.
773+
This inclues removing the API annotation that made this possible, because it doesn't
774+
serve another purpose.
775+
- Ensure we don't break the "latestRV" usecase for StorageVersionMigrator reusing the
776+
informer cache from the kube-controller-manager
777+
- Ensure that the feature is usable by external projects by validating it works with
778+
controller-runtime out-of-the-box via simple enablement
779+
- Add support for AcceptContentType header with the value application/json;as=Table and
780+
application/json;as=PartialObjectMetadata
769781
- [Switch](https://github.com/kubernetes/kubernetes/blob/a07b1aaa5b39b351ec8586de800baa5715304a3f/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go#L416)
770782
the `storage/cacher` to use streaming directly from etcd
771783
(This will also allow us to [remove](https://github.com/kubernetes/kubernetes/blob/a07b1aaa5b39b351ec8586de800baa5715304a3f/staging/src/k8s.io/client-go/tools/cache/reflector.go#L110) the `reflector.UseWatchList` field).
772-
- Currently, WatchList request does not support the use of the AcceptContentType header with the value application/json;as=Table.
773-
When this value is set, the API will return a 406 Not Acceptable response.
774-
This behavior needs to be updated to ensure compatibility with standard LIST requests.
784+
- Enable the feature by-default for kube-controller-manager.
785+
786+
[this document]: https://docs.google.com/document/d/1x30DjXSSF5krpyoTCwManJg6vphpnGI37xfCRaiHAbs
775787

788+
#### GA
789+
- No user issues reported
776790

777791
#### Post-GA
778792
- Make **list** calls expensive in APF.
@@ -914,10 +928,10 @@ Pick one of these and delete the rest.
914928

915929
- [x] Feature gate (also fill in values in `kep.yaml`)
916930
- Feature gate name: WatchList
917-
- Components depending on the feature gate:
918-
- kube-apiserver
919-
- Feature gate name: WatchListClient (the actual name might be different because it hasn't been added yet)
920931
- Components depending on the feature gate:
932+
- kube-apiserver
933+
- Feature gate name: WatchListClient
934+
- Components depending on the feature gate:
921935
- kube-controller-manager via client-go library
922936
- [ ] Other
923937
- Describe the mechanism:

keps/sig-api-machinery/3157-watch-list/kep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ stage: beta
2020
# The most recent milestone for which work toward delivery of this KEP has been
2121
# done. This can be the current (upcoming) milestone, if it is being actively
2222
# worked on.
23-
latest-milestone: "v1.32"
23+
latest-milestone: "v1.34"
2424

2525
# The milestone at which this feature was, or is targeted to be, at each stage.
2626
milestone:

0 commit comments

Comments
 (0)