Skip to content

Commit 987f092

Browse files
search: document INDEXED_SEARCH_INDEXERS (#1145)
INDEXED_SEARCH_INDEXERS was added in a previous release but I missed to document it properly which caused unexpected log spam for customers using docker and failed pods for customers on K8S without service discovery. --------- Co-authored-by: Marc <[email protected]>
1 parent 6f93fca commit 987f092

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

docs/admin/deploy/docker-compose/configuration.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,30 +125,32 @@ If you must use a `.netrc` file to store these credentials instead, follow the p
125125

126126
## Add replicas
127127

128-
When adding replicas for `gitserver`, `indexed-search`, `searcher`, or `symbols`, you must update the corresponding environment variable on each of the frontend services in your docker-compose.override.yaml file, `SRC_GIT_SERVERS`, `INDEXED_SEARCH_SERVERS`, `SEARCHER_URL`, and `SYMBOLS_URL` to the number of replicas for each respective service. Sourcegraph will then automatically infer the endpoints for each replica.
128+
When adding replicas for `gitserver`, `searcher`, `symbols`, `zoekt-indexserver`, or `zoekt-webserver`, you must update the corresponding environment variable on each of the frontend services in your docker-compose.override.yaml file to the number of replicas for the respective service. Sourcegraph will then automatically infer the containers' endpoints for each replica.
129129

130130
```yaml
131131
# docker-compose.override.yaml
132132
services:
133133
134134
sourcegraph-frontend-0:
135135
environment:
136-
- 'SRC_GIT_SERVERS=2'
137-
- 'INDEXED_SEARCH_SERVERS=2'
136+
- 'INDEXED_SEARCH_INDEXERS=1'
137+
- 'INDEXED_SEARCH_SERVERS=1'
138138
- 'SEARCHER_URL=1'
139+
- 'SRC_GIT_SERVERS=1'
139140
- 'SYMBOLS_URL=1'
140141
141142
sourcegraph-frontend-internal:
142143
environment:
143-
- 'SRC_GIT_SERVERS=2'
144-
- 'INDEXED_SEARCH_SERVERS=2'
144+
- 'INDEXED_SEARCH_INDEXERS=1'
145+
- 'INDEXED_SEARCH_SERVERS=1'
145146
- 'SEARCHER_URL=1'
147+
- 'SRC_GIT_SERVERS=1'
146148
- 'SYMBOLS_URL=1'
147149
```
148150

149151
## Shard gitserver
150152

151-
If you find that your gitserver container is performing poorly, you can shard it into multiple containers. This is especially helpful when your Docker Compose host can mount multiple storage volumes, and each gitserver shared can use its own storage IOPS limit.
153+
If you find that your gitserver container is performing poorly, you can shard it into multiple containers. This is especially helpful when your Docker Compose host can mount multiple storage volumes, and each gitserver shard can use its own storage IOPS limit.
152154

153155
To split gitserver across multiple shards:
154156

docs/admin/deploy/kubernetes/configure.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ RBAC must be enabled in your cluster for the frontend to communicate with other
8282

8383
This will allow the frontend service to discover endpoints for each service replica and communicate with them through the Kubernetes API. Note that this component should only be added if RBAC is enabled in your cluster.
8484

85+
If you are not using Kubernetes service discovery (for example, if you are running without RBAC or outside Kubernetes), you must manually configure service endpoints for the frontend. See [Running Sourcegraph Without Kubernetes Service Discovery](/admin/deploy/without_service_discovery) for instructions.
86+
8587
---
8688

8789
## Monitoring stack
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Running Sourcegraph Without Kubernetes Service Discovery
2+
3+
<Callout type="warning">Not settting these environment variables might prevent pods from starting when running without service discovery.</Callout>
4+
5+
If you are deploying Sourcegraph in an environment **without Kubernetes service discovery** (for example, using Docker Compose or single-container Docker), you must manually configure the frontend service to know about the other service replicas. This is typically required when you are not using RBAC, or when running outside Kubernetes entirely.
6+
7+
## Required Environment Variables
8+
9+
- INDEXED_SEARCH_INDEXER
10+
- INDEXED_SEARCH_SERVERS
11+
- SEARCHER_URL
12+
- SRC_GIT_SERVERS
13+
- SYMBOLS_URL
14+
15+
For detailed instructions on how to set these environment variables in a Docker Compose deployment, see the [Docker Compose configuration guide](/admin/deploy/docker-compose/configuration#set-environment-variables).

0 commit comments

Comments
 (0)