- Adapt client-side caching mechanism to reduce API server calls to
api-serverKubernetes cluster component. - Add
/deploymentsAPI endpoint to FastHTTP server - Return JSON array of deployment names from the informer's local cache.
-
Package cache is a client-side caching mechanism. It is useful for reducing the number of server calls you'd otherwise need to make. Reflector watches a server and updates a Store. Two stores are provided; one that simply caches objects (for example, to allow a scheduler to list currently available nodes), and one that additionally acts as a FIFO queue (for example, to allow a scheduler to process incoming pods).
-
GetStore returns the informer's local cache as a Store
E.g.:
deploymentInformer.GetStore().List()
- To compile controller, run:
make build- To start server, run
./k8s-controller --log-level trace --kubeconfig ~/.kube/config server --namespace <namespace> --labelSelectors labelName=labelValue- Call
/deploymentsAPI endpoint to list deployment names for specified namespace and labelSelectors in step 2.
curl http://localhost:<port>/deployments