Skip to content

Commit 05b8f2c

Browse files
authored
Reapply "Remove symbols statefulset" (#676) (#677)
### 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) Test plan: Will be picked up by internal cloud instances tracking main. We'll watch the rollout in ArgoCD.
1 parent f8dd02a commit 05b8f2c

File tree

12 files changed

+14
-290
lines changed

12 files changed

+14
-290
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: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,22 @@ 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
6464
# storageSize in the VolumeClaimTemplate below
65-
value: "23400"
65+
value: "11700"
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
73+
# storageSize in the VolumeClaimTemplate below
74+
value: "11700"
6675
{{- end }}
6776
- name: POD_NAME
6877
valueFrom:

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.

charts/sourcegraph/tests/priorityClass_test.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,6 @@ tests:
9696
- equal:
9797
path: spec.template.spec.priorityClassName
9898
value: searcher-class
99-
- it: set priority class on symbols
100-
template: symbols/symbols.StatefulSet.yaml
101-
set:
102-
symbols:
103-
priorityClassName: symbols-class
104-
asserts:
105-
- equal:
106-
path: spec.template.spec.priorityClassName
107-
value: symbols-class
10899
- it: set priority class on redisCache
109100
template: redis/redis-cache.Deployment.yaml
110101
set:

charts/sourcegraph/values.yaml

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,46 +1096,6 @@ storageClass:
10961096
# learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#allowed-topologies)
10971097
allowedTopologies: []
10981098

1099-
symbols:
1100-
image:
1101-
# -- Docker image tag for the `symbols` image
1102-
defaultTag: 6.0.0@sha256:7f91048d1966add54b199755c77a5c3ca84b7f57bb5d2ffb65113da7f100b051
1103-
# -- Docker image name for the `symbols` image
1104-
name: "symbols"
1105-
# -- Security context for the `symbols` container,
1106-
# learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container)
1107-
containerSecurityContext:
1108-
allowPrivilegeEscalation: false
1109-
runAsUser: 100
1110-
runAsGroup: 101
1111-
readOnlyRootFilesystem: true
1112-
# -- Security context for the `symbols` pod,
1113-
# learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod)
1114-
podSecurityContext:
1115-
runAsUser: 100
1116-
fsGroup: 101
1117-
fsGroupChangePolicy: "OnRootMismatch"
1118-
# -- Name used by resources. Does not affect service names or PVCs.
1119-
name: "symbols"
1120-
# -- Number of `symbols` pod
1121-
replicaCount: 1
1122-
# -- Resource requests & limits for the `symbols` container,
1123-
# learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
1124-
resources:
1125-
limits:
1126-
cpu: "2"
1127-
memory: 2G
1128-
requests:
1129-
cpu: 500m
1130-
memory: 500M
1131-
serviceAccount:
1132-
# -- Enable creation of ServiceAccount for `symbols`
1133-
create: false
1134-
# -- Name of the ServiceAccount to be created or an existing ServiceAccount
1135-
name: ""
1136-
# -- Size of the PVC for symbols pods to store cache data
1137-
storageSize: 12Gi
1138-
11391099
syntectServer:
11401100
image:
11411101
# -- Docker image tag for the `syntect-server` image

0 commit comments

Comments
 (0)