Repository navigation
Fix/cross workspace names - #135
Merged
SheryarButt merged 3 commits intoOct 15, 2026
Merged
Conversation
Signed-off-by: sheryarbutt <m.sheryarbutt@gmail.com>
Signed-off-by: sheryarbutt <m.sheryarbutt@gmail.com>
2 tasks
Signed-off-by: sheryarbutt <m.sheryarbutt@gmail.com>
SheryarButt
force-pushed
the
fix/cross-workspace-names
branch
from
October 14, 2026 09:32
2853961 to
928d065
Compare
ntnn
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Two
HttpBins with the same name and namespace in different kcp workspaces end up sharing one Deployment and Service on the service cluster.default, so both workspaces got the same Deployment, Service and HTTPRoute (or Ingress host). Deleting one workspace's order deleted the other workspace's httpbin too.remote-object-name/-namespacelabel lookups never matched (the api-syncagent sets those as annotations), so the names always fell back to the synced object's name.httpbin_crselector label had the same problem, so each Service selected the pods of both workspaces.Changes
getSyncedID():<remote-object-cluster>-<sha256(namespace/name)[:10]>, built from thesyncagent.kcp.io/remote-object-clusterlabel, which is copied to theHttpBinDeploymentand exists in every api-syncagent release.getResourceName(httpbin-<id>),getDNSName(<id>.<base-domain>,--domainstill wins),getPathand thehttpbin_crselector value (getSelectorValue()) use it.test/test_utils.go: the e2e suite waited for a Deployment namedexample-httpbin-operator, but kustomize deploysexample-httpbin-operator-controller-manager, so every e2e test failed during setup. Separate commit.Upgrade note
Synced resources get new names, so the operator creates new Deployments, Services, HTTPRoutes and Ingresses. The old ones (
httpbin-<synced name>) are not cleaned up and have to be deleted manually. Unsynced resources keep their names.Testing
make testandmake lintmake docker-build IMG=example-httpbin-operator:e2e && make test-e2e IMG=example-httpbin-operator:e2e: 3/3 pass (all 3 fail without thetest_utils.gochange)msp-httpbin-operatorwithout itsnamingblock), two consumer workspaces orderingdefault/httpbin-demo:/get--local-http-route --domain=httpbin.services.portal.localhost(as in the helm-charts local setup): v0.6.2 gives both workspaces the same HTTPRoute and URL; with this change each gets its own path and URL and answers under its prefix--local-ingressand--local-ingress-update: one host per workspaceHttpBincreated directly on kind keeps the v0.6.2 namesRelated to platform-mesh/contrib-examples#10