Add nginx deployment
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
- Checkout
main
helm install gitlab-zoekt .
- 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'
- Verify that search works with
kubectl exec gitlab-zoekt-0 -- curl -XPOST -d '{"Q":"gitaly"}' 'http://127.0.0.1:6070/api/search'
- Checkout
add-nginx-deployment
- Execute
helm upgrade gitlab-zoekt .
- 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'
- Execute
helm upgrade gitlab-zoekt . --set gateway.replicas=2 --set replicas=2
- 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 - 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 - 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