Skip to content

Commit 84a859f

Browse files
authored
Merge pull request kubernetes#75474 from hormes/add_heartbeat_inside_watch
add heartbeat inside watch
2 parents 2347da8 + d70edd3 commit 84a859f

File tree

14 files changed

+572
-40
lines changed

14 files changed

+572
-40
lines changed

staging/src/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (d *decoratedWatcher) run(ctx context.Context) {
5555
return
5656
}
5757
switch recv.Type {
58-
case watch.Added, watch.Modified, watch.Deleted:
58+
case watch.Added, watch.Modified, watch.Deleted, watch.Bookmark:
5959
err := d.decorator(recv.Object)
6060
if err != nil {
6161
send = makeStatusErrorEvent(err)

staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,7 @@ func (e *Store) Watch(ctx context.Context, options *metainternalversion.ListOpti
10751075
resourceVersion := ""
10761076
if options != nil {
10771077
resourceVersion = options.ResourceVersion
1078+
predicate.AllowWatchBookmarks = options.AllowWatchBookmarks
10781079
}
10791080
return e.WatchPredicate(ctx, predicate, resourceVersion)
10801081
}

staging/src/k8s.io/apiserver/pkg/storage/cacher/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ go_test(
5959
"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library",
6060
"//staging/src/k8s.io/apiserver/pkg/apis/example:go_default_library",
6161
"//staging/src/k8s.io/apiserver/pkg/apis/example/v1:go_default_library",
62+
"//staging/src/k8s.io/apiserver/pkg/features:go_default_library",
6263
"//staging/src/k8s.io/apiserver/pkg/storage:go_default_library",
6364
"//staging/src/k8s.io/apiserver/pkg/storage/etcd:go_default_library",
65+
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
66+
"//staging/src/k8s.io/apiserver/pkg/util/feature/testing:go_default_library",
6467
"//staging/src/k8s.io/client-go/tools/cache:go_default_library",
6568
],
6669
)

0 commit comments

Comments
 (0)