Skip to content

Commit 085b3b0

Browse files
eseligerenriquegh
authored andcommitted
Remove symbols statefulset (#675)
Starting in Sourcegraph 6.4, the Symbols and Searcher services are now combined, for easier operation, simplified architecture, and better resource utilization. Customers can delete the service if not deleted automatically, and may want to consider reallocating resources previously given to symbols to searcher. Environment variables should be copied over from symbols to searcher. Test plan: This deployment ran for ~2 weeks on S2 and dotcom already and has signoff from team-product-platform. ### Checklist - [ ] Follow the [manual testing process](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/TEST.md) - [x] Update [changelog](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/charts/sourcegraph/CHANGELOG.md) - [x] Update [Kubernetes update doc](https://docs.sourcegraph.com/admin/updates/kubernetes): sourcegraph/docs#1117
1 parent 0320d8f commit 085b3b0

File tree

12 files changed

+15
-291
lines changed

12 files changed

+15
-291
lines changed

charts/sourcegraph/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Use `**BREAKING**:` to denote a breaking change
1111
- Fix Pod Disruption Budget for sourcegraph-frontend
1212
- Added a startup probe to the gitserver statefulset to give it time to run the on-disk migration from repo names to repo IDs
1313
- The repo-updater service is no longer needed and has been removed from the chart.
14+
- The symbols service is no longer needed and has been removed from the chart. Consider merging env vars and resource overrides given to symbols into searcher before upgrading.
1415

1516
## 5.10.0
1617

charts/sourcegraph/README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ In addition to the documented values, all services also support the following va
298298
| searcher.resources | object | `{"limits":{"cpu":"2","memory":"2G"},"requests":{"cpu":"500m","memory":"500M"}}` | Resource requests & limits for the `searcher` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
299299
| searcher.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `searcher` |
300300
| searcher.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
301-
| searcher.storageSize | string | `"26Gi"` | Size of the PVC for searcher pods to store cache data |
301+
| searcher.storageSize | string | `"52Gi"` | Size of the PVC for searcher pods to store cache data |
302302
| sourcegraph.affinity | object | `{}` | Global Affinity, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) |
303303
| sourcegraph.image.defaultTag | string | `"{{ .Chart.AppVersion }}"` | Global docker image tag |
304304
| sourcegraph.image.pullPolicy | string | `"IfNotPresent"` | Global docker image pull policy |
@@ -320,16 +320,6 @@ In addition to the documented values, all services also support the following va
320320
| storageClass.parameters | object | `{}` | Extra parameters of storageClass, consult your cloud provider persistent storage documentation |
321321
| storageClass.provisioner | string | `"kubernetes.io/gce-pd"` | Name of the storageClass provisioner, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#provisioner) and consult your cloud provider persistent storage documentation |
322322
| storageClass.type | string | `"pd-ssd"` | Value of `type` key in storageClass `parameters`, consult your cloud provider persistent storage documentation |
323-
| symbols.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `symbols` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
324-
| symbols.image.defaultTag | string | `"6.0.0@sha256:7f91048d1966add54b199755c77a5c3ca84b7f57bb5d2ffb65113da7f100b051"` | Docker image tag for the `symbols` image |
325-
| symbols.image.name | string | `"symbols"` | Docker image name for the `symbols` image |
326-
| symbols.name | string | `"symbols"` | Name used by resources. Does not affect service names or PVCs. |
327-
| symbols.podSecurityContext | object | `{"fsGroup":101,"fsGroupChangePolicy":"OnRootMismatch","runAsUser":100}` | Security context for the `symbols` pod, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) |
328-
| symbols.replicaCount | int | `1` | Number of `symbols` pod |
329-
| symbols.resources | object | `{"limits":{"cpu":"2","memory":"2G"},"requests":{"cpu":"500m","memory":"500M"}}` | Resource requests & limits for the `symbols` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
330-
| symbols.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `symbols` |
331-
| symbols.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
332-
| symbols.storageSize | string | `"12Gi"` | Size of the PVC for symbols pods to store cache data |
333323
| syntacticCodeIntel.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `syntactic-code-intel-worker` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
334324
| syntacticCodeIntel.enabled | bool | `false` | |
335325
| syntacticCodeIntel.image.defaultTag | string | `"6.0.0@sha256:50bdeb38b196f0fc21404969016bf8263f78144292e905867e93480f66c8251c"` | Docker image tag for the `syntactic-code-intel-worker` image |

charts/sourcegraph/examples/advanced-scheduling/override.yaml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,6 @@ searcher:
9393
app: searcher
9494
weight: 100
9595

96-
symbols:
97-
replicaCount: 3
98-
affinity:
99-
podAntiAffinity:
100-
preferredDuringSchedulingIgnoredDuringExecution:
101-
- podAffinityTerm:
102-
topologyKey: kubernetes.io/hostname
103-
labelSelector:
104-
matchLabels:
105-
<<: *commonSelectorLabels
106-
app: symbols
107-
weight: 100
108-
10996
worker:
11097
replicaCount: 3
11198
affinity:

charts/sourcegraph/examples/basic/override.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,3 @@ searcher:
6464
requests:
6565
cpu: 500m
6666
memory: 1G
67-
68-
symbols:
69-
resources:
70-
limits:
71-
cpu: "4"
72-
memory: 4G
73-
ephemeral-storage: "10G"
74-
requests:
75-
cpu: "1"
76-
memory: 1G
77-
ephemeral-storage: "10G"

charts/sourcegraph/examples/common-modifications/override.yaml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,19 +183,6 @@ searcher:
183183
ephemeral-storage: 25G
184184
memory: 500M
185185

186-
187-
symbols:
188-
replicaCount: 1
189-
resources:
190-
limits:
191-
cpu: "2"
192-
ephemeral-storage: 12G
193-
memory: 2G
194-
requests:
195-
cpu: 500m
196-
ephemeral-storage: 10G
197-
memory: 500M
198-
199186
syntectServer:
200187
replicaCount: 1
201188
resources:

charts/sourcegraph/examples/gcp/override.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ searcher:
7474
SRC_LOG_FORMAT:
7575
value: json_gcp
7676

77-
symbols:
78-
env:
79-
SRC_LOG_FORMAT:
80-
value: json_gcp
81-
8277
syntectServer:
8378
env:
8479
SRC_LOG_FORMAT:

charts/sourcegraph/templates/searcher/searcher.StatefulSet.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,20 @@ spec:
5656
{{- $item | toYaml | nindent 10 }}
5757
{{- end }}
5858
- name: SEARCHER_CACHE_SIZE_MB
59-
# Set the cache size to ~90% of the PVC size
59+
# Set the cache size to ~45% of the PVC size
6060
{{- if .Values.searcher.storageSize }}
61-
value: {{ trimSuffix "Gi" .Values.searcher.storageSize | mul 900 | quote }}
61+
value: {{ trimSuffix "Gi" .Values.searcher.storageSize | mul 450 | quote }}
6262
{{- else }}
63-
# This value is ~90% of the default value for
63+
# This value is ~45% of the default value for
64+
# storageSize in the VolumeClaimTemplate below
65+
value: "23400"
66+
{{- end }}
67+
- name: SYMBOLS_CACHE_SIZE_MB
68+
# Set the cache size to ~45% of the PVC size
69+
{{- if .Values.searcher.storageSize }}
70+
value: {{ trimSuffix "Gi" .Values.searcher.storageSize | mul 450 | quote }}
71+
{{- else }}
72+
# This value is ~45% of the default value for
6473
# storageSize in the VolumeClaimTemplate below
6574
value: "23400"
6675
{{- end }}

charts/sourcegraph/templates/symbols/symbols.Service.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

charts/sourcegraph/templates/symbols/symbols.ServiceAccount.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

charts/sourcegraph/templates/symbols/symbols.StatefulSet.yaml

Lines changed: 0 additions & 145 deletions
This file was deleted.

0 commit comments

Comments
 (0)