-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use controller-runtime for ClusterWorkspaceType initializer #16
Comments
I created a reproducer for this issue:
|
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. If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with /lifecycle rotten |
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.The text was updated successfully, but these errors were encountered: