Closed MatousJobanek closed 4 months ago
I created a reproducer for this issue: https://github.com/MatousJobanek/controller-runtime-example/tree/cwt-reproducer
Widget
But it does it for the VirtualWorkspace endpoint, not for the actual workspace that is being initialized:
This is actually fine - the virtual workspace will proxy the request through to the correct cluster. The proximal issue here is that the request is not being made to the correct cluster.
Yeah, I used the wrong wording - what I meant was that it's using the URL with the wildcard at the end instead of putting the name of the workspace that is being initialized. I fixed it in the description.
Issues go stale after 90d of inactivity.
After a furter 30 days, they will turn rotten.
Mark the issue as fresh with /remove-lifecycle stale
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
/close
@kcp-ci-bot: Closing this issue.
Consider that I have a ClusterWorkspaceType and an initializer that is supposed to create an APIBinding. That initializer is watching a VirtualWorkspace of the given CWT, however, when it tries to create an APIBinding, then it fails with:
The reason is that the rest mapper tries to do the discovery call before calling the POST for the APIBinding. But it does it for the VirtualWorkspace endpoint with the wildcard
/clusters/*
at the end of the URL, not with the name of the workspace that is being initialized/clusters/root:plane:usersignup:foo/
:There are two problems in the rest mapper code:
context.TODO()
https://github.com/kubernetes/client-go/blob/release-1.23/discovery/discovery_client.go#L172 and not the one that is provided from the controller. This means that the context doesn't have the cluster name value so the cluster-aware round-tripper cannot do its job.