Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement correct watch restart for controller runtime #543

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

smira
Copy link
Member

@smira smira commented Dec 27, 2024

Controller runtime does WatchKind on all controller input resources, but initial bookmark value is only delivered if there is any update received (on each of the watches).

If resource cache is used, BootstrapContents will deliver the bookmark, but if the cache is not used, and there are no updates, no bookmark is ever sent, so watch can't be restarted.

Fix this by adding yet another option to send 'Noop' events which carry only the bookmark allowing watch retry code to handle it.

Fixes #540

Controller runtime does `WatchKind` on all controller input resources,
but initial bookmark value is only delivered if there is any update
received (on each of the watches).

If resource cache is used, `BootstrapContents` will deliver the
bookmark, but if the cache is not used, and there are no updates, no
bookmark is ever sent, so watch can't be restarted.

Fix this by adding yet another option to send 'Noop' events which carry
only the bookmark allowing watch retry code to handle it.

Signed-off-by: Andrey Smirnov <[email protected]>
@smira
Copy link
Member Author

smira commented Dec 27, 2024

Uses cosi-project/specification#14

I will do a similar change to state-etcd to support initial bookmarks.

@smira
Copy link
Member Author

smira commented Dec 27, 2024

/m

@talos-bot talos-bot merged commit 2d42e3e into cosi-project:main Dec 27, 2024
14 checks passed
smira added a commit to smira/state-etcd that referenced this pull request Dec 27, 2024
smira added a commit to smira/state-etcd that referenced this pull request Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants