Description
This issue is for an LXF mentorship project, see https://mentorship.lfx.linuxfoundation.org/project/1b9a4a99-2d92-4c1a-ac34-7fe554bf6393 There you can learn more and apply if interested. Please do not start this issue, as it is reserved for that project.
Having a cache layer for the Kubernetes API will allow us to reduce load on the Kubernetes API, and also enable some faster usage of the data.
There are two main improvements a K8s API cache in the backend headlamp-server will allow:
- Kubernetes API pagination could be done better to allow grabbing from the frontend only the page of data the client is viewing. Rather than having to download several pages first.
- For search, it would be better to be able to search the cached data from the API so again the frontend does not need to download it all.
It's important to consider the access to the cache is only by the same contexts which access it. So that data from the cache does not go out to the wrong people.
This is about implementing the API cache in the backend, providing a better pagination API, and providing a search API.
Additional context
Virtualization issue with discussion of pagination issue: #1312
Kubernetes Dashboard PR and design: https://github.com/kubernetes/dashboard/pull/9521/files#diff-dc34dd6f7585add2ed0a897e077541423b103eb8ee64a331beb494fdb3e6f4ed
Video explaining the issue: https://www.youtube.com/watch?v=1n6tBTj2sFM