Zoekt indexer with internal API support
What does this MR do and why?
This MR adds internal API support to Zoekt.
The most important piece here is the nginx config change. It allows us to send requests like /nodes/gitlab-zoekt-1.gitlab-zoekt.default.svc.cluster.local
, which will be proxied to the correct underlying pod.
How to test
- Change
replicas: 1
toreplicas: 2
intemplates/stateful_sets.yaml
helm install gitlab-zoekt .
- Open 2 terminal windows with logs:
kubectl logs -f gitlab-zoekt-0 -c zoekt-gateway
andkubectl logs -f gitlab-zoekt-1 -c zoekt-gateway
- Execute
kubectl exec gitlab-zoekt-0 -- curl -XPOST -d '{"Q":"gitaly"}' 'http://gitlab-zoekt.default.svc.cluster.local:8080/nodes/gitlab-zoekt-1.gitlab-zoekt.default.svc.cluster.local/api/search'
- You should see that the request goes to a random pod first, and nginx proxies it to
gitlab-zoekt-1
Edited by Dmitry Gruzd