Repository navigation
Conversation
Adds two opt-in services next to the legacy indexed-search StatefulSet: - zoekt-indexer (zoektIndexer.enabled): a Deployment that runs index jobs and publishes generations through object storage, with a scratch PVC per pod by default or an emptyDir. - zoekt-searcher (zoektSearcher.enabled): a StatefulSet of webservers that serve the active generations of their slots. Like gitserver continuity, the Zoekt settings (SRC_ZOEKT_*) are environment variables only; the chart has no values for them. indexedSearch.enabled removes the legacy StatefulSet once searches have switched, and the frontend then gets an empty INDEXED_SEARCH_SERVERS. Amp-Thread-ID: https://ampcode.com/threads/T-597f342f-9754-47be-8f3e-3c5ffc344e41
eseliger
force-pushed
the
indexed-search-continuity
branch
from
December 1, 2026 00:39
091ea29 to
6e9ed2f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the two services of the new Zoekt indexed search architecture (sourcegraph/sourcegraph#20044) as opt-in workloads, and lets the legacy
indexed-searchStatefulSet be removed once searches have switched. With default values,helm templaterenders the same manifests asmain.Like gitserver continuity, the chart only runs the workloads. It has no values for the Zoekt settings:
SRC_ZOEKT_INDEXER_ENABLED,SRC_ZOEKT_SEARCHER_ROUTING,SRC_ZOEKT_WARM_REPLICASand the rest are plain environment variables, set the same way in theenvoffrontend,worker,searcher,zoektSearcherandzoektIndexer. Sourcegraph Cloud renders them from the controller (sourcegraph/controller#2893). On-prem rollout will get its own design later, so the chart doesn't encode the migration.New values
zoektIndexer.enabled(defaultfalse) renders thezoekt-indexerDeployment and a headless metrics Service. It's a stateless index job runner. Each pod gets a scratch PVC by default (scratch.persistentVolume, with a StorageClass whose disks are deleted when the claim goes away), or an emptyDir when that'sfalse. Its settings arereplicaCount,image,command/args,env,scratchandresources. It useszoektSearcher's ServiceAccount, security contexts and scheduling.zoektSearcher.enabled(defaultfalse) renders thezoekt-searcherStatefulSet and headless Service, plus an optional PDB and ServiceAccount. Its values are modelled onindexedSearch. The frontend finds it atk8s+rpc://zoekt-searcher:6070?kind=sts; the Service publishes not-ready addresses, so the frontend can tell a warming webserver from a missing one.indexedSearch.enabled(defaulttrue) gates everyindexed-searchobject. When it'sfalse, the frontend gets emptyINDEXED_SEARCH_SERVERSandINDEXED_SEARCH_INDEXER, so it stops looking for the removed StatefulSet.The legacy
indexed-searchobjects render exactly as onmainwhether the new services are on or off. That includes its image,sourcegraph/indexed-searcher, which an earlier revision of this branch had renamed by mistake.Test plan
helm unittest charts/sourcegraph: 282 tests pass.tests/zoekt_test.yamlcovers the default (no new objects), each service on its own and both together, scratch PVC versus emptyDir, the shared ServiceAccount, and removingindexed-search.tests/gracefulShutdown_test.yamlcovers both new services.helm templatewith defaults is byte-identical tomain.indexedSearch.enabled: false, the render has the expected objects and images (zoekt-indexer,zoekt-searcher, and noindexed-searchobjects), and the frontend gets an emptyINDEXED_SEARCH_SERVERS.