Skip to content

Conversation

xrstf
Copy link
Contributor

@xrstf xrstf commented Sep 1, 2025

Summary

This PR implements basic support for creating sync-related events on objects in kcp. Since the agent has no knowledge of any kind of operators behind it, it at the moment cannot report anything application-specific, and so all the events related to its own operation instead, like

  • adding resource schemas to an APIExport
  • synchronizing objects
  • deleting/cleaning up objects

I chose to attempt to keep the synchronization itself to be somewhat subdued. In my mind, users of kcp who make use of APIExports and stuff, should never need to know or care whether their objects are synced/copied/transfered/compressed or whatever behind the scenes to make things work. So the events the agent creates are meant to not constantly remind users that external clusters and synchronizations are involved at all. This is done on a best effort basis though.

In order to create events, the syncagent will now claim events in every APIExport it manages. Existing APIBindings will need to be updated to grant the agent this permission.

Additionally, this PR adds make test-e2e to make quick testing easier.

Adding event support required the latest commits of multicluster libraries, which require kube 1.33 already. However latest kcp versions (0.28.1) are on 1.32 still. We chose to break away from kcp because controller-runtime's desire for 1.33 was ultimately stronger.

What Type of PR Is This?

/kind feature

Related Issue(s)

Fixes #17

Release Notes

The sync-agent will now create events on source objects in kcp. Existing APIBindings to APIExports managed by the agent will need to be updated to accept the new `events` permission claim.

@kcp-ci-bot kcp-ci-bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has signed the DCO. labels Sep 1, 2025
@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from xrstf. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kcp-ci-bot kcp-ci-bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 1, 2025
@kcp-ci-bot kcp-ci-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels Sep 1, 2025
@xrstf
Copy link
Contributor Author

xrstf commented Sep 2, 2025

/kind feature

@kcp-ci-bot kcp-ci-bot added kind/feature Categorizes issue or PR as related to a new feature. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 2, 2025
@xrstf xrstf changed the title WIP - Events Create Events in kcp Sep 2, 2025
@kcp-ci-bot kcp-ci-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 2, 2025
@xrstf xrstf changed the title Create Events in kcp Create events in kcp Sep 2, 2025
@xrstf xrstf requested a review from embik September 5, 2025 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has signed the DCO. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: issue events on the source objects
2 participants