kcp: APIExport consumer can't wildcard list/watch its schemas until the first APIBinding is created
Describe the bug A controller using APIExports can’t successfully start up and wildcard list/watch the APIs it’s exporting until the first APIBinding is created.
To Reproduce Steps to reproduce the behavior:
- Create an APIResourceSchema
- Create an APIExport that exports the APIResourceSchema
- Try to do a wildcard list/watch through the APIExport virtual workspace, such as
https://$server/services/apiexport/root:default:andy/controller-runtime-example-data.my.domain/clusters/*/apis/data.my.domain/v1alpha1/widgets
- Get a 404
In a controller-runtime app, you’d see something like this:
1.6541008964721239e+09 ERROR controller-runtime.source if kind is a CRD, it should be installed before calling Start {"kind": "Widget.data.my.domain", "error": "no matches for kind \"Widget\" in version \"data.my.domain/v1alpha1\""}
Expected behavior The controller should be able to start listing/watching its APIs even without any APIBindings for it
Additional context None
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 25 (25 by maintainers)
also creating APIExports could create a storm of storage creations and list/watches. Doing that on demand when a binding shows up is much much better.
There can be many. And there is just no need to tell controllers to list/watch shards without bindings.
Yes, this is for APIExports in general, so it’s not specific to the vw server.
It’s 1 CRD per APIResourceSchema. An APIExport can export 1…n APIResourceSchemas.
Maybe?
I was responding to:
We likely want some user-facing way to expose this waiting state, ultimately.
I don’t think we want a copy of every schema in every cluster.
I’m working on a fix