kcp-dev / contrib-tmc

An experimental add-on readding some Kubernetes compute APIs and impement transparent multi-cluster scheduling
Apache License 2.0
5 stars 3 forks source link

feature: A better way to lookup the namespace of an upsynced resource #66

Open jmprusi opened 1 year ago

jmprusi commented 1 year ago

Feature Description

When upsyncing a resource, the original downstream namespace is lost as it has to match the upstream namespace.

In some cases, when trying to find the downstreamNamespace of a resource we can only rely on generating the NamespaceLocator and calculating the downstreamNamespace, but this could not be true after a migration or some edge cases.

Proposed Solution

Add a new annotation to the upsynced resource that contains the original downstream namespace.

Alternative Solutions

Another solution could be to add the downstreamNamespace annotation to the upstream Namespace itself but that could be challenging as the upstream Namespace could be synced to multiple sync targets.

Want to contribute?

Additional Context

This is an issue when trying to locate the downstream Namespace from the KCP server: https://github.com/kcp-dev/kcp/pull/2401/files#diff-2fde0c8e9703eb571caa1ea29ac59f42c7a43c5c12cfa3b97fe0f3f6f865df79R195-R206

mjudeikis commented 1 year ago

/transfer-issue contrib-tmc