Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.92 KB

docs.md

File metadata and controls

54 lines (36 loc) · 1.92 KB

Kube Pod Autocomplete documentation

This service retrieves specific data based on the requested resource type and supported filters.

Supported resources

Resource Available Filters
pods ✅ namespace, phase, labels, annotations
services 🟡 Coming Soon

API-Spec

Checkout the OpenAPI file or use the Swagger spec.

Quick-start

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

Future improvements

  • 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 from OpenAPI 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, using cmd.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.)