From 38afbaa9602cb444a0993be48de9d58ee1344112 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Mon, 2 Nov 2026 18:07:45 -0600 Subject: [PATCH 1/2] sourcegraph: Drop redundant PRECISE_CODE_INTEL_UPLOAD_* env The hardcoded PRECISE_CODE_INTEL_UPLOAD_BACKEND=blobstore and PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT=http://blobstore:9000 on frontend, worker, precise-code-intel-worker, and syntactic-code-intel-worker match Sourcegraph's built-in defaults, and the legacy compat shim ignores the endpoint when the backend is blobstore. SOURCEGRAPH_UPLOAD_* in *.env is now the only object storage configuration in the chart. They also rendered after *.env, so with blobstore.enabled they overrode any PRECISE_CODE_INTEL_UPLOAD_* a user set there. Follow-up to sourcegraph/deploy-sourcegraph-docker#1461. Amp-Thread-ID: https://ampcode.com/threads/T-01a19e9e-5e4f-7408-9834-0de841fee3e4 Co-authored-by: Amp --- charts/sourcegraph/CHANGELOG.md | 1 + charts/sourcegraph/templates/_worker.tpl | 6 ------ .../templates/frontend/sourcegraph-frontend.Deployment.yaml | 6 ------ .../templates/precise-code-intel/worker.Deployment.yaml | 6 ------ .../templates/syntactic-code-intel/worker.Deployment.yaml | 6 ------ 5 files changed, 1 insertion(+), 24 deletions(-) diff --git a/charts/sourcegraph/CHANGELOG.md b/charts/sourcegraph/CHANGELOG.md index 3762b719..8ce18398 100644 --- a/charts/sourcegraph/CHANGELOG.md +++ b/charts/sourcegraph/CHANGELOG.md @@ -8,6 +8,7 @@ Use `**BREAKING**:` to denote a breaking change ## Unreleased +- Removed the hardcoded `PRECISE_CODE_INTEL_UPLOAD_BACKEND=blobstore` and `PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT=http://blobstore:9000` environment variables from `frontend`, `worker`, `precise-code-intel-worker`, and `syntactic-code-intel-worker`. They matched Sourcegraph's built-in defaults, so default deployments are unchanged. `SOURCEGRAPH_UPLOAD_*` in `*.env` is now the only object storage configuration in the chart, as in the `external-object-storage` examples. Previously, with `blobstore.enabled: true`, the chart's values were rendered after `*.env` and overrode any `PRECISE_CODE_INTEL_UPLOAD_*` set there; those overrides now take effect. - Added `syntacticCodeIntel.storageType`, `syntacticCodeIntel.storageSize`, and `syntacticCodeIntel.storageClassName`, so the `syntactic-code-intel-worker` `/tmp` scratch volume can be a per-pod PVC (generic ephemeral volume) instead of an `emptyDir` on the node boot disk, matching `preciseCodeIntel`. The default remains an unbounded `emptyDir`. - Added an `outbound-http-proxy` example, which routes outbound traffic from frontend, worker, and migrator through an HTTP proxy with `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` - Fixed the `codeintel-db` PersistentVolumeClaim being renamed by `codeIntelDB.name`, which left the StatefulSet pointing at a `codeintel-db` claim that no longer existed and stuck the pod in `Pending`. The PVC is now always named `codeintel-db`, matching the other components and the documented behaviour of `*.name`. If you worked around this by creating a `codeintel-db` PVC by hand, label it `app.kubernetes.io/managed-by: Helm` and annotate it with `meta.helm.sh/release-name` and `meta.helm.sh/release-namespace` before upgrading so Helm can adopt it. [#612](https://github.com/sourcegraph/deploy-sourcegraph-helm/issues/612) diff --git a/charts/sourcegraph/templates/_worker.tpl b/charts/sourcegraph/templates/_worker.tpl index 2b087e7f..cc64d589 100644 --- a/charts/sourcegraph/templates/_worker.tpl +++ b/charts/sourcegraph/templates/_worker.tpl @@ -82,12 +82,6 @@ spec: - name: {{ $name }} {{- $item | toYaml | nindent 10 }} {{- end }} - {{- if $top.Values.blobstore.enabled }} - - name: PRECISE_CODE_INTEL_UPLOAD_BACKEND - value: blobstore - - name: PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT - value: http://blobstore:9000 - {{- end }} - name: POD_NAME valueFrom: fieldRef: diff --git a/charts/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml b/charts/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml index 41575281..ba903943 100644 --- a/charts/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ b/charts/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml @@ -99,12 +99,6 @@ spec: {{- end }} {{- include "sourcegraph.redisConnection" .| nindent 8 }} {{- include "sourcegraph.openTelemetryEnv" . | nindent 8 }} - {{- if .Values.blobstore.enabled }} - - name: PRECISE_CODE_INTEL_UPLOAD_BACKEND - value: blobstore - - name: PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT - value: http://blobstore:9000 - {{- end }} terminationMessagePolicy: FallbackToLogsOnError livenessProbe: httpGet: diff --git a/charts/sourcegraph/templates/precise-code-intel/worker.Deployment.yaml b/charts/sourcegraph/templates/precise-code-intel/worker.Deployment.yaml index 74e59a48..be911b77 100644 --- a/charts/sourcegraph/templates/precise-code-intel/worker.Deployment.yaml +++ b/charts/sourcegraph/templates/precise-code-intel/worker.Deployment.yaml @@ -62,12 +62,6 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name - {{- if .Values.blobstore.enabled }} - - name: PRECISE_CODE_INTEL_UPLOAD_BACKEND - value: blobstore - - name: PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT - value: http://blobstore:9000 - {{- end }} {{- include "sourcegraph.openTelemetryEnv" . | nindent 8 }} image: {{ include "sourcegraph.image" (list . "preciseCodeIntel") }} imagePullPolicy: {{ .Values.sourcegraph.image.pullPolicy }} diff --git a/charts/sourcegraph/templates/syntactic-code-intel/worker.Deployment.yaml b/charts/sourcegraph/templates/syntactic-code-intel/worker.Deployment.yaml index 70b88c55..7c7839f0 100644 --- a/charts/sourcegraph/templates/syntactic-code-intel/worker.Deployment.yaml +++ b/charts/sourcegraph/templates/syntactic-code-intel/worker.Deployment.yaml @@ -63,12 +63,6 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name - {{- if .Values.blobstore.enabled }} - - name: PRECISE_CODE_INTEL_UPLOAD_BACKEND - value: blobstore - - name: PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT - value: http://blobstore:9000 - {{- end }} {{- include "sourcegraph.openTelemetryEnv" . | nindent 8 }} image: {{ include "sourcegraph.image" (list . "syntacticCodeIntel") }} imagePullPolicy: {{ .Values.sourcegraph.image.pullPolicy }} From 0ef5b7b5d8cd52e782f929638e06dc6e0a3e6faa Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Mon, 2 Nov 2026 22:27:17 -0600 Subject: [PATCH 2/2] CHANGELOG: PRECISE_CODE_INTEL_UPLOAD_* overrides apply one upgrade later Helm's three-way merge deletes every duplicate env entry on the upgrade that removes the chart's hardcoded values, so a *.env override only comes back on the following helm upgrade. Amp-Thread-ID: https://ampcode.com/threads/T-01a19e9e-5e4f-7408-9834-0de841fee3e4 Co-authored-by: Amp --- charts/sourcegraph/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/sourcegraph/CHANGELOG.md b/charts/sourcegraph/CHANGELOG.md index 8ce18398..62c4280d 100644 --- a/charts/sourcegraph/CHANGELOG.md +++ b/charts/sourcegraph/CHANGELOG.md @@ -8,7 +8,7 @@ Use `**BREAKING**:` to denote a breaking change ## Unreleased -- Removed the hardcoded `PRECISE_CODE_INTEL_UPLOAD_BACKEND=blobstore` and `PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT=http://blobstore:9000` environment variables from `frontend`, `worker`, `precise-code-intel-worker`, and `syntactic-code-intel-worker`. They matched Sourcegraph's built-in defaults, so default deployments are unchanged. `SOURCEGRAPH_UPLOAD_*` in `*.env` is now the only object storage configuration in the chart, as in the `external-object-storage` examples. Previously, with `blobstore.enabled: true`, the chart's values were rendered after `*.env` and overrode any `PRECISE_CODE_INTEL_UPLOAD_*` set there; those overrides now take effect. +- Removed the hardcoded `PRECISE_CODE_INTEL_UPLOAD_BACKEND=blobstore` and `PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT=http://blobstore:9000` environment variables from `frontend`, `worker`, `precise-code-intel-worker`, and `syntactic-code-intel-worker`. They matched Sourcegraph's built-in defaults, so default deployments are unchanged. `SOURCEGRAPH_UPLOAD_*` in `*.env` is now the only object storage configuration in the chart, as in the `external-object-storage` examples. Previously, with `blobstore.enabled: true`, the chart's values were rendered after `*.env` and overrode any `PRECISE_CODE_INTEL_UPLOAD_*` set there. Helm's three-way merge removes every duplicate of those names on this upgrade, including the `*.env` override, and the override is applied on the next `helm upgrade` after this one, when code-intel uploads switch to its bucket. Before that, make sure the bucket exists, or move the settings to `SOURCEGRAPH_UPLOAD_*`, or remove them. Run a second `helm upgrade` right away to make the switch at a known time. - Added `syntacticCodeIntel.storageType`, `syntacticCodeIntel.storageSize`, and `syntacticCodeIntel.storageClassName`, so the `syntactic-code-intel-worker` `/tmp` scratch volume can be a per-pod PVC (generic ephemeral volume) instead of an `emptyDir` on the node boot disk, matching `preciseCodeIntel`. The default remains an unbounded `emptyDir`. - Added an `outbound-http-proxy` example, which routes outbound traffic from frontend, worker, and migrator through an HTTP proxy with `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` - Fixed the `codeintel-db` PersistentVolumeClaim being renamed by `codeIntelDB.name`, which left the StatefulSet pointing at a `codeintel-db` claim that no longer existed and stuck the pod in `Pending`. The PVC is now always named `codeintel-db`, matching the other components and the documented behaviour of `*.name`. If you worked around this by creating a `codeintel-db` PVC by hand, label it `app.kubernetes.io/managed-by: Helm` and annotate it with `meta.helm.sh/release-name` and `meta.helm.sh/release-namespace` before upgrading so Helm can adopt it. [#612](https://github.com/sourcegraph/deploy-sourcegraph-helm/issues/612)