-
Notifications
You must be signed in to change notification settings - Fork 430
Description
Feature Description
Currently, we have a hard-coded list of resources that the cache-server knows about, and there is no way to add other user-defined resources.
Adding New Resources
Not implemented at the moment. Our near-term plan is to maintain a list of hard-coded resources that we want to keep in the cache server. In the future, we will use the ReplicationClam which will describe schemas that need to be exposed by the cache server.
https://docs.kcp.io/kcp/main/concepts/sharding/cache-server/#adding-new-resources
There are strong use cases for when we would want arbitrary resources to be replicated and accessible across shards.
Proposed Solution
First option is CachedResources API: it already handles the use-cases around replication of arbitrary resources, the basics are there. There are two hurdles to overcome:
- Consumption: CachedResources relies on its sister resource CachedObjects on the cache server side, making it not suitable for general k8s clients. We'd need to expose the actual GVK of the referenced resource in the CachedResource.
- Schema: the resource referenced by CachedResource is schema-less. We need to somehow make this work on the client side.
- We can assume that the owner of the CachedResource is responsible for the resource, including the schema.
- The CachedResource has
.status.identityHash, we can use this and pair GVR+hash to distinguish between resources.
Second option is customizing cached-server itself. We'd need a special "claim" resource anyway (similar to what the docs pasted above says). The pros is we have more flexibility over what we need, cons is we already have CachedResources that fall into the same category of use-cases.
Alternative Solutions
No response
Want to contribute?
- I would like to work on this issue.
Additional Context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status