From 2ec6951f43d267c4e0c2b6687a37e2d05e2c0f2f Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Sat, 24 Oct 2026 00:16:03 -0600 Subject: [PATCH] sourcegraph: Drop DEPLOY_TYPE from zoekt and syntect-server containers zoekt-webserver, zoekt-indexserver, and syntect-server are not built from sourcegraph/sourcegraph and never read DEPLOY_TYPE, so the default added in Amp-Thread-ID: https://ampcode.com/threads/T-01a16c86-310a-72d8-8a7e-9025e822232c Co-authored-by: Amp #929 is dead config on those containers. --- charts/sourcegraph/CHANGELOG.md | 1 + charts/sourcegraph/README.md | 6 +++--- charts/sourcegraph/tests/deployType_test.yaml | 21 ------------------- charts/sourcegraph/values.yaml | 15 +++---------- 4 files changed, 7 insertions(+), 36 deletions(-) diff --git a/charts/sourcegraph/CHANGELOG.md b/charts/sourcegraph/CHANGELOG.md index 11acb065..8dbae47a 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 default `DEPLOY_TYPE=helm` env var from the `zoekt-webserver`, `zoekt-indexserver`, and `syntect-server` containers; none of those binaries read it - 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) - Added opt-in Redis config management through `redisCache.config.enabled` and `redisStore.config.enabled` (both default to `false`). Default deployments retain their image configs, custom mounts, authentication, and memory settings. When enabled, the chart mounts `/etc/redis/redis.conf` and supports `existingConfig`, `maxmemory`, `maxmemoryRatio`, `maxmemoryPolicy`, and `additionalConfig`. See [Enabling Redis config management](README.md#enabling-redis-config-management) before opting in, especially when using custom images or Secret-mounted configs. diff --git a/charts/sourcegraph/README.md b/charts/sourcegraph/README.md index 2506226e..f1a06f3a 100644 --- a/charts/sourcegraph/README.md +++ b/charts/sourcegraph/README.md @@ -218,7 +218,7 @@ In addition to the documented values, all services also support the following va | grafana.storageSize | string | `"2Gi"` | PVC Storage Request for `grafana` data volume | | grafana.storageSubPath | string | `""` | Optional subPath for the `grafana` primary data volume mount | | indexedSearch.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `zoekt-webserver` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) | -| indexedSearch.env | object | the chart will add some default environment values | Environment variables for the `zoekt-webserver` container | +| indexedSearch.env | object | `{}` | Environment variables for the `zoekt-webserver` container | | indexedSearch.image.defaultTag | string | `@sha256:`, pinned by each release | Docker image tag for the `zoekt-webserver` image | | indexedSearch.image.name | string | `"indexed-searcher"` | Docker image name for the `zoekt-webserver` image | | indexedSearch.name | string | `"indexed-search"` | Name used by resources. Does not affect service names or PVCs. | @@ -232,7 +232,7 @@ In addition to the documented values, all services also support the following va | indexedSearch.storageSize | string | `"200Gi"` | PVC Storage Request for `indexed-search` data volume The size of disk to used for search indexes. This should typically be gitserver disk size multiplied by the number of gitserver shards. | | indexedSearch.storageSubPath | string | `""` | Optional subPath for the `indexed-search` primary data volume mount | | indexedSearchIndexer.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `zoekt-indexserver` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) | -| indexedSearchIndexer.env | object | the chart will add some default environment values | Environment variables for the `zoekt-indexserver` container | +| indexedSearchIndexer.env | object | `{}` | Environment variables for the `zoekt-indexserver` container | | indexedSearchIndexer.image.defaultTag | string | `@sha256:`, pinned by each release | Docker image tag for the `zoekt-indexserver` image | | indexedSearchIndexer.image.name | string | `"search-indexer"` | Docker image name for the `zoekt-indexserver` image | | indexedSearchIndexer.resources | object | `{"limits":{"cpu":"8","memory":"8G"},"requests":{"cpu":"4","memory":"4G"}}` | Resource requests & limits for the `zoekt-indexserver` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) zoekt-indexserver is CPU bound. The more CPU you allocate to it, the lower lag between a new commit and it being indexed for search. | @@ -459,7 +459,7 @@ In addition to the documented values, all services also support the following va | syntacticCodeIntel.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `syntactic-code-intel-worker` | | syntacticCodeIntel.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount | | 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) | -| syntectServer.env | object | the chart will add some default environment values | Environment variables for the `syntect-server` container | +| syntectServer.env | object | `{}` | Environment variables for the `syntect-server` container | | syntectServer.image.defaultTag | string | `@sha256:`, pinned by each release | Docker image tag for the `syntect-server` image | | syntectServer.image.name | string | `"syntax-highlighter"` | Docker image name for the `syntect-server` image | | syntectServer.name | string | `"syntect-server"` | Name used by resources. Does not affect service names or PVCs. | diff --git a/charts/sourcegraph/tests/deployType_test.yaml b/charts/sourcegraph/tests/deployType_test.yaml index 9259286a..920ff23e 100644 --- a/charts/sourcegraph/tests/deployType_test.yaml +++ b/charts/sourcegraph/tests/deployType_test.yaml @@ -27,19 +27,6 @@ tests: content: name: DEPLOY_TYPE value: helm -- it: should identify both indexed search containers as Helm deployments - template: indexed-search/indexed-search.StatefulSet.yaml - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: DEPLOY_TYPE - value: helm - - contains: - path: spec.template.spec.containers[1].env - content: - name: DEPLOY_TYPE - value: helm - it: should identify migrator as a Helm deployment template: frontend/sourcegraph-frontend.Deployment.yaml asserts: @@ -74,14 +61,6 @@ tests: content: name: DEPLOY_TYPE value: helm -- it: should identify syntect server as a Helm deployment - template: syntect-server/syntect-server.Deployment.yaml - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: DEPLOY_TYPE - value: helm - it: should identify every worker replica as a Helm deployment template: worker/worker.Deployment.yaml set: diff --git a/charts/sourcegraph/values.yaml b/charts/sourcegraph/values.yaml index 9b9dab82..80297ff6 100644 --- a/charts/sourcegraph/values.yaml +++ b/charts/sourcegraph/values.yaml @@ -559,10 +559,7 @@ grafana: indexedSearch: # -- Environment variables for the `zoekt-webserver` container - # @default -- the chart will add some default environment values - env: - DEPLOY_TYPE: - value: helm + env: {} image: # -- Docker image tag for the `zoekt-webserver` image # @default -- `@sha256:`, pinned by each release @@ -612,10 +609,7 @@ indexedSearch: indexedSearchIndexer: # -- Environment variables for the `zoekt-indexserver` container - # @default -- the chart will add some default environment values - env: - DEPLOY_TYPE: - value: helm + env: {} image: # -- Docker image tag for the `zoekt-indexserver` image # @default -- `@sha256:`, pinned by each release @@ -1331,10 +1325,7 @@ storageClass: syntectServer: # -- Environment variables for the `syntect-server` container - # @default -- the chart will add some default environment values - env: - DEPLOY_TYPE: - value: helm + env: {} image: # -- Docker image tag for the `syntect-server` image # @default -- `@sha256:`, pinned by each release