@@ -458,31 +458,30 @@ Extend the `ListOptions` struct with the following field:
458
458
type ListOptions struct {
459
459
...
460
460
461
- // SendInitialEvents, when set together with Watch option,
462
- // begin the watch stream with synthetic init events to build the
463
- // whole state of all resources followed by a synthetic "Bookmark"
464
- // event containing a ResourceVersion after which the server
465
- // continues streaming events.
466
- //
467
- // When SendInitialEvents option is set, we require ResourceVersionMatch
468
- // option to also be set. The semantic of the watch request is as following:
469
- // - ResourceVersionMatch = NotOlderThan
470
- // It starts with sending initial events for all objects (at some resource
471
- // version), potentially followed by an event stream until the state
472
- // becomes synced to a resource version as fresh as the one provided by
473
- // the ResourceVersion option. At this point, a synthetic bookmark event
474
- // is send and watch stream is continued to be send.
475
- // If RV is unset, this is interpreted as "consistent read" and the
476
- // bookmark event is send when the state is synced at least to the moment
477
- // when request started being processed.
478
- // - ResourceVersionMatch = Exact
479
- // Unsupported error is returned.
480
- // - ResourceVersionMatch unset (or set to any other value)
481
- // BadRequest error is returned.
482
- //
483
- // Defaults to true if ResourceVersion="" or ResourceVersion="0" (for backward
484
- // compatibility reasons) and to false otherwise.
485
- SendInitialEvents bool
461
+ // `sendInitialEvents=true` may be set together with `watch=true`.
462
+ // In that case, the watch stream will begin with synthetic events to
463
+ // produce the current state of objects in the collection. Once all such
464
+ // events have been sent, a synthetic "Bookmark" event will be sent.
465
+ // The bookmark will report the ResourceVersion (RV) corresponding to the
466
+ // set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation.
467
+ // Afterwards, the watch stream will proceed as usual, sending watch events
468
+ // corresponding to changes (subsequent to the RV) to objects watched.
469
+ //
470
+ // When `sendInitialEvents` option is set, we require `resourceVersionMatch`
471
+ // option to also be set. The semantic of the watch request is as following:
472
+ // - `resourceVersionMatch` = NotOlderThan
473
+ // is interpreted as "data at least as new as the provided `resourceVersion`"
474
+ // and the bookmark event is send when the state is synced
475
+ // to a `resourceVersion` at least as fresh as the one provided by the ListOptions.
476
+ // If `resourceVersion` is unset, this is interpreted as "consistent read" and the
477
+ // bookmark event is send when the state is synced at least to the moment
478
+ // when request started being processed.
479
+ // - `resourceVersionMatch` set to any other value or unset
480
+ // Invalid error is returned.
481
+ //
482
+ // Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward
483
+ // compatibility reasons) and to false otherwise.
484
+ SendInitialEvents *bool
486
485
}
487
486
```
488
487
@@ -625,6 +624,14 @@ extending the production code to implement this enhancement.
625
624
- k8s.io/client-go/tools/cache/reflector: 02/02/2023 - 88,6%
626
625
627
626
##### Integration tests
627
+
628
+ <!--
629
+ Integration tests are contained in k8s.io/kubernetes/test/integration.
630
+ Integration tests allow control of the configuration parameters used to start the binaries under test.
631
+ This is different from e2e tests which do not allow configuration of parameters.
632
+ Doing this allows testing non-default options and multiple different and potentially conflicting command line options.
633
+ -->
634
+
628
635
<!--
629
636
This question should be filled when targeting a release.
630
637
For Alpha, describe what tests will be added to ensure proper quality of the enhancement.
@@ -650,9 +657,11 @@ We expect no non-infra related flakes in the last month as a GA graduation crite
650
657
651
658
#### Alpha
652
659
653
- - The Feature is implemented behind ` ConsistentWatchList ` feature flag
660
+ - The Feature is implemented behind ` WatchList ` feature flag
654
661
- Initial e2e tests completed and enabled
655
662
- Scalability/Performance tests confirm gains of this feature
663
+ - Metrics are added to the kube-apiserver (see the [ monitoring-requirements] ( #monitoring-requirements ) section for more details)
664
+ - Implement ` SendInitialEvents ` for ` watch ` requests in the etcd storage implementation
656
665
657
666
<!--
658
667
**Note:** *Not required until targeted at a release.*
@@ -787,7 +796,7 @@ Pick one of these and delete the rest.
787
796
-->
788
797
789
798
- [x] Feature gate (also fill in values in ` kep.yaml ` )
790
- - Feature gate name: ConsistentWatchList
799
+ - Feature gate name: WatchList
791
800
- Components depending on the feature gate: the kube-apiserver
792
801
- [ ] Other
793
802
- Describe the mechanism:
0 commit comments