Skip to content

feat(dind): multi-queue support and Docker mode fixes#876

Open
michaellzc wants to merge 4 commits into
mainfrom
michaellzc/dind-multi-queue
Open

feat(dind): multi-queue support and Docker mode fixes#876
michaellzc wants to merge 4 commits into
mainfrom
michaellzc/dind-multi-queue

Conversation

@michaellzc
Copy link
Copy Markdown
Member

@michaellzc michaellzc commented Jun 4, 2026

related https://github.com/sourcegraph/sourcegraph/pull/12881

Summary

  • Add queues list to values: when set, renders one Deployment per queue instead of the single executor Deployment; each queue merges with global executor.env (queue overrides global) and supports replicaCount and resources overrides
  • Add executor.resources global and per-queue resources override for the executor container
  • Fix readiness probe path from /ready (404) to /healthz — the health server only exposes /healthz
  • Set EXECUTOR_USE_KUBERNETES=false to prevent the executor from auto-detecting Kubernetes mode via KUBERNETES_SERVICE_HOST/PORT (always injected into pods); requires executor image with EXECUTOR_USE_KUBERNETES flag support (sourcegraph/sourcegraph@e87902b)
  • Set enableServiceLinks: false to reduce env noise in pods
  • Fix private docker registry image (docker/registry:2registry:3)

Test plan

  • Deployed to dev cluster with both batches and codeintel queues
  • Verified executors are running in Docker mode (no RBAC errors)
  • helm template renders correctly for both multi-queue and single-deployment modes
storageClass:
  create: false
  name: sourcegraph

sourcegraph: 
  image:
    repository: us-docker.pkg.dev/sourcegraph-images/external
    defaultTag: docker-images-notest-06-03-fix_374565_2026-06-04_7.3-e87902b59ff0
    useGlobalTagAsDefault: true

executor:
  replicaCount: 4
  env:
    # -- The external URL of the Sourcegraph instance. Required.
    EXECUTOR_FRONTEND_URL:
      value: "http://frontend.sourcegraph.internal"
    # -- The shared secret configured in the Sourcegraph instance site config under executors.accessToken. Required.
    EXECUTOR_FRONTEND_PASSWORD:
      value: <redacted>

queues:
  - name: batches
    replicaCount: 4
    env:
      EXECUTOR_QUEUE_NAME:
        value: batches
  - name: codeintel
    replicaCount: 4
    env:
      EXECUTOR_QUEUE_NAME:
        value: codeintel

🤖 Generated with Claude Code

michaellzc and others added 2 commits June 3, 2026 19:18
- Add `queues` list to values: when set, renders one Deployment + Service
  per queue instead of the single executor Deployment
- Each queue merges with global executor.env (queue overrides global) and
  supports replicaCount and resources overrides
- Add global executor.resources and per-queue resources override
- Fix readiness probe path: /ready does not exist, use /healthz
- Set EXECUTOR_USE_KUBERNETES=false to prevent the executor from
  auto-detecting Kubernetes mode via KUBERNETES_SERVICE_HOST/PORT (which
  are always injected into pods); dind chart runs in Docker mode using
  the dind sidecar
- Set enableServiceLinks: false to reduce noise in pod env
- Fix private docker registry image tag (registry:3)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@michaellzc michaellzc force-pushed the michaellzc/dind-multi-queue branch from eca8932 to 33125ec Compare June 4, 2026 02:21
@michaellzc michaellzc requested review from a team June 4, 2026 02:22
@marcleblanc2
Copy link
Copy Markdown
Contributor

marcleblanc2 commented Jun 4, 2026

This syntax seems awkward to operate (easier to get wrong than to get right for a new customer's junior admin)

queues:
  - name: batches
    replicaCount: 4
    env:
      EXECUTOR_QUEUE_NAME:
        value: batches
  - name: codeintel
    replicaCount: 4
    env:
      EXECUTOR_QUEUE_NAME:
        value: codeintel

If possible, this would be simpler:

queues:
  batches:
    replicaCount: 4
  codeintel:
    replicaCount: 4

Or this, if either queue can use the same number of replicas

queues:
  batches:
  codeintel:

--registry-mirror was pointing at http://executor:5000 which doesn't
resolve; the private registry service is private-docker-registry:5000.
Also fix ConfigMap condition to render in both single and multi-queue modes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@marcleblanc2
Copy link
Copy Markdown
Contributor

marcleblanc2 commented Jun 4, 2026

Actually, to help reduce the transition cost of moving customers from the k8s Helm chart to this one, it'd be ideal if this Helm chart could read the same values from an override file which was successful with the k8s Helm chart @michaellzc

@marcleblanc2
Copy link
Copy Markdown
Contributor

marcleblanc2 commented Jun 4, 2026

Some examples here: https://sourcegraph.sourcegraph.com/search?q=repo:%5Egithub%5C.com/sourcegraph/customer-assets$+lang:YAML+%5Eexecutor:$&patternType=regexp&sm=0

Also to note, it's common to use one Helm values override.yaml file when deploying multiple of our Helm charts, so the values which get read from multiple charts don't need to be maintained in duplicate in separate override files.

Copy link
Copy Markdown
Contributor

@marcleblanc2 marcleblanc2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comments in the PR thread re: ergonomics of using the added YAML syntax; it looks easier to get wrong than it is to get right, especially for some of our self-hosted customer admins.

StatefulSet gives stable pod identity and manages its own PVC via
volumeClaimTemplates, replacing the separate PersistentVolumeClaim.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.

3 participants