Repository navigation
Set DEPLOY_TYPE=docker-compose - #1512
Merged
Merged
Conversation
The worker runs the update-check job that sends pings, but had no DEPLOY_TYPE, so deploy.Type() fell back to kubernetes and Docker Compose instances reported their deploy type as kubernetes. Amp-Thread-ID: https://ampcode.com/threads/T-01a20e96-2bcd-7332-8f00-abc10c5225ac Co-authored-by: Amp <amp@ampcode.com>
Like deploy-sourcegraph-helm#929 does for Helm, set DEPLOY_TYPE explicitly instead of relying on deploy.Type()'s kubernetes fallback, which is wrong for Docker Compose. Covers every service with an image in the base, executor, and Jaeger compose files, and the migrator in the two example overrides that replace its environment with !override.
4 of 6 tasks
Match deploy-sourcegraph-helm#929: set it only on Sourcegraph services, not on the databases, Redis, monitoring, Caddy, OpenTelemetry, or Jaeger, where it has no meaning. Amp-Thread-ID: https://ampcode.com/threads/T-01a20e96-2bcd-7332-8f00-abc10c5225ac Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
enabled auto-merge (squash)
November 24, 2026 22:19
michaellzc
approved these changes
Nov 24, 2026
marcleblanc2
added a commit
to sourcegraph/deploy-sourcegraph-k8s
that referenced
this pull request
Nov 24, 2026
### Problem The `update-check` job which sends pings was moved to the `worker` container in v8, but only `sourcegraph-frontend` and its `migrator` init container have `DEPLOY_TYPE` set (from the `sourcegraph-frontend-env` ConfigMap), so all Kustomize instances have been reporting deployment type `kubernetes` once they upgrade to v8. ### Solution Borrowing the same from sourcegraph/deploy-sourcegraph-helm#929, this sets `DEPLOY_TYPE=kustomize`, on the same Sourcegraph containers: | Helm (#929) | Kustomize | |---|---| | frontend | `sourcegraph-frontend` container `frontend` | | migrator | `sourcegraph-frontend` init container `migrator`, and the `migrator` Job in `components/utils/migrator` | | gitserver | `gitserver` | | zoekt-webserver, zoekt-indexserver | `indexed-search` containers `zoekt-webserver`, `zoekt-indexserver` | | searcher | `searcher` | | precise-code-intel-worker | `precise-code-intel-worker` | | syntactic-code-intel-worker | `syntactic-code-intel` | | syntect-server | `syntect-server` | | worker | `worker` | | blobstore | `blobstore` | | (separate executor chart) | `executor` in `components/executors/k8s` and `components/executors/dind` | Same change for Docker Compose: sourcegraph/deploy-sourcegraph-docker#1512 --- ## Checklist - [ ] Update [CHANGELOG.md](https://github.com/sourcegraph/deploy-sourcegraph-k8s/blob/main/CHANGELOG.md) (not present in this repo) - [ ] Update [K8s Upgrade notes](https://github.com/sourcegraph/sourcegraph/blob/main/doc/admin/updates/kubernetes.md) (not needed) - [x] Kustomize-specific changes - [x] Update sister repository: [deploy-sourcegraph-helm](https://github.com/sourcegraph/deploy-sourcegraph-helm) (#929) - [x] Update sister repository: [deploy-sourcegraph-docker](https://github.com/sourcegraph/deploy-sourcegraph-docker) (#1512) - [x] Verify all images have a valid tag and SHA256 sum (no image changes) ## Test plan - Rendered every example that builds (`aws`, `base`, `dev`, `executors`, `gke`, `minikube`, `monitoring`, `old-cluster`, `privileged`) with `kubectl kustomize`. In each, exactly the containers in the table above have `DEPLOY_TYPE=kustomize`. - Checked the `executors/dind` and `utils/migrator` workloads directly. Same result. - `kubeconform -strict` (Kubernetes 1.33.0, as in `.buildkite/verify-yaml.sh`) passes on `./base` and on the `base` and `executors` examples. - CI renders the examples and validates `./base`. --------- Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
update-checkjob which sends pings was moved to theworkercontainer in v8, butworkerdidn't ahveDEPLOY_TYPEset, so all Docker Compose instances have been reporting deployment typekubernetesonce they upgrade to v8.Solution
Borrowing the same from sourcegraph/deploy-sourcegraph-helm#929, this sets
DEPLOY_TYPE=docker-compose, on the same Sourcegraph services:sourcegraph-frontend-0,sourcegraph-frontend-internal(already set)migratorgitserver-0zoekt-webserver-0,zoekt-indexserver-0searcher-0precise-code-intel-workersyntactic-code-intel-workersyntect-serverworkerblobstoreexecutorinexecutors/executor.docker-compose.yamlChecklist
Test plan
DEPLOY_TYPE=docker-composeon all 26 services with an override and randocker compose up -d. Every recreated container started with 0 restarts, nothing went unhealthy,migratorexited 0, the worker logged no errors, and/healthzreturned 200.docker-composebinary and runs the smoke test.docker compose config(Docker Compose 5.8.0) for the base file, base + executors, base + Jaeger,db-only-migrate, base +dev, and base + each of the six example overrides. All are valid. In each, exactly the services in the table above haveDEPLOY_TYPE=docker-compose.