This service retrieves specific data based on the requested resource type and supported filters.
Resource | Available Filters |
---|---|
pods ✅ | namespace, phase, labels, annotations |
services 🟡 | Coming Soon |
Checkout the OpenAPI file or use the Swagger spec.
Create a Cluster:
make up
Deploy Kube Pod Autocomplete:
make deploy
Deploy some pods:
make deploy-testdata
Port-forward to Kube Pod Autocomplete:
kubectl port-forward -n kube-pod-autocomplete "svc/$(kubectl get svc -n kube-pod-autocomplete -o jsonpath='{.items[0].metadata.name}')" 8080:8080 1>/dev/null &
Hit the endpoint:
curl -X GET http://localhost:8080/search/autocomplete/pods
- Add support for
caching
. (While the current implementation is fast with a small number of pods, but there can be problems in production environments.) -
Generate
API specification fromOpenAPI spec
. (The current solution is a really simple POC, if the project is later expanded with additional endpoints code generation from the OpenAPI spec should be utilised.) -
Improve End-to-End
Tests: (The existing end-to-end test setup is quite basic, usingcmd.Exec()
and port-forward to access the service is rather limited. Future improvements could include using an ingress controller like NGINX for more robust testing.) - Add endpoints that can be called with the received suggestions. (E.g.:
search/:resource/:filters
or get the filters from the body.) - Enable deploying with Garden. (Garden helps a lot when it comes to manually testing a project, as new features are added, this should also be implemented.)