Skip to content

Add nginx deployment

Dmitry Gruzd requested to merge add-nginx-deployment into main

What does this MR do and why?

This MR implements the suggestion to extract nginx containers from the stateful set into a separate deployment.

Screenshots or screen recordings

NAME                                    READY   STATUS    RESTARTS        AGE
gitlab-zoekt-0                          4/4     Running   0               5m1s
gitlab-zoekt-1                          4/4     Running   0               3m49s
gitlab-zoekt-gateway-5dd9db5b86-bg7ph   1/1     Running   0               3m49s
gitlab-zoekt-gateway-5dd9db5b86-mm8tn   1/1     Running   0               5m1s

How to test

  1. Checkout main
  2. helm install gitlab-zoekt .
  3. Index a repository into zoekt-0 by running
kubectl exec gitlab-zoekt-0 -- curl -XPOST -d '{"CloneUrl":"https://gitlab.com/gitlab-org/gitlab-development-kit.git","RepoId":74823}' 'http://127.0.0.1:8080/index'
  1. Verify that search works with kubectl exec gitlab-zoekt-0 -- curl -XPOST -d '{"Q":"gitaly"}' 'http://127.0.0.1:6070/api/search'
  2. Checkout add-nginx-deployment
  3. Execute helm upgrade gitlab-zoekt .
  4. Verify that search still works with kubectl exec gitlab-zoekt-0 -- curl -XPOST -d '{"Q":"gitaly"}' 'http://gitlab-zoekt.default.svc.cluster.local:8080/api/search'
  5. Execute helm upgrade gitlab-zoekt . --set gateway.replicas=2 --set replicas=2
  6. Execute kubectl exec gitlab-zoekt-0 -- curl -XPOST -d '{"Q":"gitaly"}' 'http://gitlab-zoekt-gateway.default.svc.cluster.local:8080/nodes/gitlab-zoekt-0.gitlab-zoekt.default.svc.cluster.local/api/search' to test that request goes to the correct pod
  7. Execute kubectl exec gitlab-zoekt-0 -- curl -XGET 'http://gitlab-zoekt-gateway.default.svc.cluster.local:8080/nodes/gitlab-zoekt-0.gitlab-zoekt.default.svc.cluster.local/indexer/index/74823' to test that indexing requests also work correctly
  8. You can also test TLS with the instruction from !15 (merged). The only difference is step number 5 should be kubectl exec gitlab-zoekt-0 -- curl -XPOST -d '{"Q":"gitaly"}' 'https://gitlab-zoekt-gateway.default.svc.cluster.local:8080/api/search' -i -k

gitlab-org/gitlab#424120 (closed)

How this works

See for flowchart !46 (comment 1619211598)

Edited by Jason Plum

Merge request reports