Skip to content

Set DEPLOY_TYPE=docker-compose - #1512

Merged
marcleblanc2 merged 4 commits into
mainfrom
marc/worker-deploy-type
Nov 24, 2026
Merged

marcleblanc2 merged 4 commits into
mainfrom
marc/worker-deploy-type

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The update-check job which sends pings was moved to the worker container in v8, but worker didn't ahve DEPLOY_TYPE set, so all Docker Compose 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=docker-compose, on the same Sourcegraph services:

Helm (#929) Docker Compose
frontend sourcegraph-frontend-0, sourcegraph-frontend-internal (already set)
migrator migrator
gitserver gitserver-0
zoekt-webserver, zoekt-indexserver zoekt-webserver-0, zoekt-indexserver-0
searcher searcher-0
precise-code-intel-worker precise-code-intel-worker
syntactic-code-intel-worker syntactic-code-intel-worker
syntect-server syntect-server
worker worker
blobstore blobstore
(separate executor chart) executor in executors/executor.docker-compose.yaml

Checklist

  • All images have a valid tag and SHA256 sum (no image changes)

Test plan

  • On a running Docker Compose test instance (8.2.x images, base + executors + Jaeger), set DEPLOY_TYPE=docker-compose on all 26 services with an override and ran docker compose up -d. Every recreated container started with 0 restarts, nothing went unhealthy, migrator exited 0, the worker logged no errors, and /healthz returned 200.
  • CI validates the base file with the standalone docker-compose binary and runs the smoke test.
  • Rendered 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 have DEPLOY_TYPE=docker-compose.

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>
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

@marcleblanc2 marcleblanc2 changed the title worker: set DEPLOY_TYPE=docker-compose Set DEPLOY_TYPE=docker-compose Nov 24, 2026
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.
marcleblanc2 and others added 2 commits November 24, 2026 16:32
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
marcleblanc2 enabled auto-merge (squash) November 24, 2026 22:19
@marcleblanc2
marcleblanc2 requested review from a team and eseliger November 24, 2026 22:19
@marcleblanc2
marcleblanc2 merged commit 1387641 into main Nov 24, 2026
5 checks passed
@marcleblanc2
marcleblanc2 deleted the marc/worker-deploy-type branch November 24, 2026 23:02
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants