Skip to content

Commit 8a781ff

Browse files
author
Sam Johns
authored
add comments for clarity (#247)
* add comments for clarity * docs updates * Add note on changing default searcher replicas
1 parent 9dc7a42 commit 8a781ff

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

charts/sourcegraph/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Use `**BREAKING**:` to denote a breaking change
88

99
## Unreleased
1010
* The default `hostPort`s for OpenTelemetry agent pods deployed by the DaemonSet can now be overridden by setting `openTelemetry.agent.hostPorts` for one or more of `otlpGrpc`, `otlpHttp`, and `zpages`. This allows multiple instances of Sourcegraph to be deployed on a single cluster [#245](https://github.com/sourcegraph/deploy-sourcegraph-helm/pull/245).
11+
* Update default `searcher` replicas from 2 --> 1
1112

1213
## 4.5.0
1314

charts/sourcegraph/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,11 @@ In addition to the documented values, all services also support the following va
289289
| searcher.image.name | string | `"searcher"` | Docker image name for the `searcher` image |
290290
| searcher.name | string | `"searcher"` | Name used by resources. Does not affect service names or PVCs. |
291291
| searcher.podSecurityContext | object | `{"fsGroup":101,"fsGroupChangePolicy":"OnRootMismatch","runAsUser":100}` | Security context for the `searcher` pod, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) |
292-
| searcher.replicaCount | int | `2` | Number of `searcher` pod |
292+
| searcher.replicaCount | int | `1` | Number of `searcher` pod |
293293
| 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/) |
294294
| searcher.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `searcher` |
295295
| searcher.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
296-
| searcher.storageSize | string | `"26Gi"` | |
296+
| searcher.storageSize | string | `"26Gi"` | Size of the PVC for searcher pods to store cache data |
297297
| 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) |
298298
| sourcegraph.image.defaultTag | string | `"{{ .Chart.AppVersion }}"` | Global docker image tag |
299299
| sourcegraph.image.pullPolicy | string | `"IfNotPresent"` | Global docker image pull policy |
@@ -324,7 +324,7 @@ In addition to the documented values, all services also support the following va
324324
| 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/) |
325325
| symbols.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `symbols` |
326326
| symbols.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
327-
| symbols.storageSize | string | `"12Gi"` | |
327+
| symbols.storageSize | string | `"12Gi"` | Size of the PVC for symbols pods to store cache data |
328328
| syntectServer.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `syntect-server` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
329329
| syntectServer.image.defaultTag | string | `"4.4.2@sha256:e02c9d64e431815bf51b05036463d60a2472f4a6ba8c3c475083c3b116ed0fe6"` | Docker image tag for the `syntect-server` image |
330330
| syntectServer.image.name | string | `"syntax-highlighter"` | Docker image name for the `syntect-server` image |

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ spec:
5757
{{- $item | toYaml | nindent 10 }}
5858
{{- end }}
5959
- name: SEARCHER_CACHE_SIZE_MB
60+
# Set the cache size to ~90% of the PVC size
6061
{{- if .Values.searcher.storageSize }}
6162
value: {{ trimSuffix "Gi" .Values.searcher.storageSize | mul 900 | quote }}
6263
{{- else }}
64+
# This value is ~90% of the default value for
65+
# storageSize in the VolumeClaimTemplate below
6366
value: "23400"
6467
{{- end }}
6568
- name: POD_NAME

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,12 @@ spec:
5353
{{- $item | toYaml | nindent 10 }}
5454
{{- end }}
5555
- name: SYMBOLS_CACHE_SIZE_MB
56+
# Set the cache size to ~90% of the PVC size
5657
{{- if .Values.symbols.storageSize }}
5758
value: {{ trimSuffix "Gi" .Values.symbols.storageSize | mul 900 | quote }}
5859
{{- else }}
60+
# This value is ~90% of the default value for
61+
# storageSize in the VolumeClaimTemplate below
5962
value: "10800"
6063
{{- end }}
6164
- name: POD_NAME

charts/sourcegraph/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ searcher:
10461046
# -- Name used by resources. Does not affect service names or PVCs.
10471047
name: "searcher"
10481048
# -- Number of `searcher` pod
1049-
replicaCount: 2
1049+
replicaCount: 1
10501050
# -- Resource requests & limits for the `searcher` container,
10511051
# learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
10521052
resources:
@@ -1061,6 +1061,7 @@ searcher:
10611061
create: false
10621062
# -- Name of the ServiceAccount to be created or an existing ServiceAccount
10631063
name: ""
1064+
# -- Size of the PVC for searcher pods to store cache data
10641065
storageSize: 26Gi
10651066

10661067
storageClass:
@@ -1121,6 +1122,7 @@ symbols:
11211122
create: false
11221123
# -- Name of the ServiceAccount to be created or an existing ServiceAccount
11231124
name: ""
1125+
# -- Size of the PVC for symbols pods to store cache data
11241126
storageSize: 12Gi
11251127

11261128
syntectServer:

0 commit comments

Comments
 (0)