Skip to content

Commit 0fa3a47

Browse files
committed
fix: set initial watch bookmark on "late watches"
When the watch is established in the controller runtime after the runtime starts, make sure watch asks for the initial bookmark, so that the watch can be restarted on connection failure. Signed-off-by: Andrey Smirnov <[email protected]>
1 parent ccce7a8 commit 0fa3a47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/runtime/runtime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ func (runtime *Runtime) watch(resourceNamespace resource.Namespace, resourceType
263263

264264
kind := resource.NewMetadata(resourceNamespace, resourceType, "", resource.Version{})
265265

266-
return runtime.state.WatchKindAggregated(runtime.runCtx, kind, runtime.watchCh)
266+
return runtime.state.WatchKindAggregated(runtime.runCtx, kind, runtime.watchCh, state.WithBootstrapBookmark(true))
267267
}
268268

269269
type dedup map[reduced.Metadata]struct{}

0 commit comments

Comments
 (0)