Zoekt indexer with internalApi enabled
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
How to test
- 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"
- Access rails c via toolbox pod (documentation)
- Verify that there are 2 zoekt nodes registered via
Search::Zoekt::Node.count
- Verify that
last_seen_at
is being updated every 10 seconds viaSearch::Zoekt::Node.pluck(:last_seen_at)
orSearch::Zoekt::Node.order(:id)
- Access the GitLab ignress (you can follow the quickstart quide)
- Create a project with configuration option
Initialize repository with a README
enabled - Index the project via
Gitlab::Search::Zoekt::Client.instance.index(Project.last, Search::Zoekt::Node.first.id)
- Perform a search
Gitlab::Search::Zoekt::Client.instance.search('remote', num: 20, project_ids: [Project.last.id], node_id: Search::Zoekt::Node.first.id)
- Ensure that it returns results
- You can also verify that second node doesn't have the project by replacing
Search::Zoekt::Node.first.id
withSearch::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
, duration10s
, URIscheme://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