Skip to content

Commit 0ce073c

Browse files
authored
Merge pull request #4061 from p0lyn0mial/watch-list-1-28
Update KEP 3157 (watch-list) for milestone 1.28
2 parents a6e99a8 + 82545e0 commit 0ce073c

File tree

2 files changed

+38
-29
lines changed

2 files changed

+38
-29
lines changed

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

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -458,31 +458,30 @@ Extend the `ListOptions` struct with the following field:
458458
type ListOptions struct {
459459
...
460460
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
486485
}
487486
```
488487

@@ -625,6 +624,14 @@ extending the production code to implement this enhancement.
625624
- k8s.io/client-go/tools/cache/reflector: 02/02/2023 - 88,6%
626625

627626
##### 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+
628635
<!--
629636
This question should be filled when targeting a release.
630637
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
650657

651658
#### Alpha
652659

653-
- The Feature is implemented behind `ConsistentWatchList` feature flag
660+
- The Feature is implemented behind `WatchList` feature flag
654661
- Initial e2e tests completed and enabled
655662
- 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
656665

657666
<!--
658667
**Note:** *Not required until targeted at a release.*
@@ -787,7 +796,7 @@ Pick one of these and delete the rest.
787796
-->
788797

789798
- [x] Feature gate (also fill in values in `kep.yaml`)
790-
- Feature gate name: ConsistentWatchList
799+
- Feature gate name: WatchList
791800
- Components depending on the feature gate: the kube-apiserver
792801
- [ ] Other
793802
- Describe the mechanism:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ stage: alpha
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.27"
23+
latest-milestone: "v1.28"
2424

2525
# The milestone at which this feature was, or is targeted to be, at each stage.
2626
milestone:
@@ -29,7 +29,7 @@ milestone:
2929
# The following PRR answers are required at alpha release
3030
# List the feature gate name and the components for which it must be enabled
3131
feature-gates:
32-
- name: ConsistentWatchList
32+
- name: WatchList
3333
components:
3434
- kube-apiserver
3535
disable-supported: true

0 commit comments

Comments
 (0)