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. 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
Copy link
Member

@embik embik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 16, 2025
@kcp-ci-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 5eccbe9f7c51e821e3b28c7efccc07b45b33da3e

@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: embik

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 16, 2025
@kcp-ci-bot kcp-ci-bot merged commit 09d43ad into main Sep 16, 2025
9 checks passed
@kcp-ci-bot kcp-ci-bot deleted the events branch September 16, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. 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
3 participants