Skip to content

Zoekt indexer with internal API support

Dmitry Gruzd requested to merge zoekt-indexer-heartbeat into main

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

  1. Change replicas: 1 to replicas: 2 in templates/stateful_sets.yaml
  2. helm install gitlab-zoekt .
  3. Open 2 terminal windows with logs: kubectl logs -f gitlab-zoekt-0 -c zoekt-gateway and kubectl logs -f gitlab-zoekt-1 -c zoekt-gateway
  4. 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'
  5. You should see that the request goes to a random pod first, and nginx proxies it to gitlab-zoekt-1

gitlab-org/gitlab#424120 (closed)

Edited by Dmitry Gruzd

Merge request reports