refactor agent to use multicluster-runtime #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors the agent to make use of multicluster-runtime and the apiexport provider from multicluster-provider.
Notably, since kube clients do not use the context anymore to switch between clusters, many functions in the syncer now have a dedicated singular
ctx
parameter that is used for all kube interactions on both sides of the sync.The e2e tests make use of the ClusterClient in multicluster-runtime to still be scopable down to a specific workspace (but not by setting a context anymore, but by calling
.Cluster(<name>)
).What Type of PR Is This?
/kind feature
Release Notes
/hold
This must not be merged before kcp 0.28 is released.