Skip to content

Zoekt indexer with internalApi enabled

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

What does this MR do?

This MR enables internal API support from Add nginx deployment (gitlab-org/cloud-native/charts/gitlab-zoekt!46 - merged) as well as adds a new the gateway container to a separate deployment.

Screenshots or screen recordings

Click to expand

helm-zoekt.svg

How to test

  1. Install the helm chart with
helm install gitlab . \
--set certmanager-issuer.email=email@example.com \
--set gitlab-zoekt.install=true \
--set gitlab-zoekt.replicas=2 \
--set gitlab-zoekt.indexer.internalApi.enabled=true \
--set global.zoekt.indexer.internalApi.gitlabUrl="http://gitlab-webservice-default:8080"
  1. Access rails c via toolbox pod (documentation)
  2. Verify that there are 2 zoekt nodes registered via Search::Zoekt::Node.count
  3. Verify that last_seen_at is being updated every 10 seconds via Search::Zoekt::Node.pluck(:last_seen_at) or Search::Zoekt::Node.order(:id)
  4. Access the GitLab ignress (you can follow the quickstart quide)
  5. Create a project with configuration option Initialize repository with a README enabled
  6. Index the project via Gitlab::Search::Zoekt::Client.instance.index(Project.last, Search::Zoekt::Node.first.id)
  7. Perform a search Gitlab::Search::Zoekt::Client.instance.search('remote', num: 20, project_ids: [Project.last.id], node_id: Search::Zoekt::Node.first.id)
  8. Ensure that it returns results
  9. You can also verify that second node doesn't have the project by replacing Search::Zoekt::Node.first.id with Search::Zoekt::Node.last.id

Related issues

gitlab-org/gitlab#424120 (closed)

Author checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • When ready for review, follow the instructions in the "Reviewer Roulette" section of the Danger Bot MR comment, as per the Distribution experimental MR workflow

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added/updated
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
  • Equivalent MR/issue for Gitlab Operator project opened (see Operator documentation on impact of Charts changes)
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.
Edited by Mitchell Nielsen

Merge request reports