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.
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