Skip to content

executors: set EXECUTOR_DEPLOY_TYPE in both executor charts - #1032

Draft
marcleblanc2 wants to merge 2 commits into
mainfrom
marc/executor-deploy-type
Draft

marcleblanc2 wants to merge 2 commits into
mainfrom
marc/executor-deploy-type

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

We can't tell which customers deploy which kind of executor. Pings report only each executor's runtime mode (docker, firecracker, kubernetes), so the Helm and Kustomize Docker-in-Docker charts, Docker Compose, and manual Docker installs all report docker, and Helm vs Kustomize or Terraform vs manual installs can't be told apart.

Solution

Set EXECUTOR_DEPLOY_TYPE on the executor container in both executor charts:

  • sourcegraph-executor-k8s: helm-k8s, in the executor ConfigMap
  • sourcegraph-executor-dind: helm-dind, in the executor container's env

The executor sends it to its Sourcegraph instance, and pings report it (sourcegraph#19875). Older executors ignore the variable. Not exposed as a value: it identifies the chart, so users have no reason to change it. The dind chart's executor.validateEnv now rejects it in executor.env and queues[].env, like the other variables the chart sets, so a user entry can't add a duplicate key.

Checklist

Test plan

  • helm unittest passes for both charts; each now asserts the variable's value, and a dind test asserts that executor.env can't set it (it fails without the validateEnv entry).
  • helm lint passes for both charts.
  • ./scripts/helm-docs.sh makes no change (no values.yaml change).
  • Deployed both charts to m5 (EKS) with executor images from sourcegraph#19875 (Buildkite build 412794). Against the live release, the k8s chart's render differs only by the new ConfigMap line. executor_heartbeats stored helm-k8s and helm-dind, and the instance's ping reported them as executorDeployType (details in sourcegraph#19875). The dind chart ran in a namespace with the privileged Pod Security level, since m5 enforces restricted.

Linked PRs

Each executor deployment method sets EXECUTOR_DEPLOY_TYPE, the executor sends it to its Sourcegraph instance, and pings report it. Merge in this order:

  1. sourcegraph/analytics#1181: BigQuery update_checks schema field; merge and apply to the live table before #19875 merges
  2. sourcegraph/sourcegraph#19875: executor reads EXECUTOR_DEPLOY_TYPE, instance stores it and reports it in pings; product docs
  3. sourcegraph/deploy-sourcegraph-helm#1032: helm-k8s, helm-dind
  4. sourcegraph/deploy-sourcegraph-k8s#522: kustomize-k8s, kustomize-dind
  5. sourcegraph/deploy-sourcegraph-docker#1513: docker-compose
  6. sourcegraph/terraform-aws-executors#238: terraform-aws
  7. sourcegraph/terraform-google-executors#248: terraform-gcp
  8. sourcegraph/controller#2883: sourcegraph-cloud, for Sourcegraph Cloud-managed executors
  9. sourcegraph/docs#2190: legacy docs site; binary, binary-offline in the Linux binary install examples; merge after the release that ships #19875

3 to 8 can merge in any order once #19875 has merged; older executors ignore the variable.

Amp threads

Changelog

Set EXECUTOR_DEPLOY_TYPE to helm-k8s in the sourcegraph-executor-k8s chart and helm-dind in the sourcegraph-executor-dind chart, so pings report which chart deployed the executors.

@github-actions

Copy link
Copy Markdown

marcleblanc2 and others added 2 commits November 25, 2026 18:10
The k8s chart sets helm-k8s and the dind chart sets helm-dind, so pings report which chart deployed the executors.
The chart sets it, so a user env entry would add a duplicate key.

Amp-Thread-ID: https://ampcode.com/threads/T-01a214e9-44e3-7480-898c-b3ec8d72df68
Co-authored-by: Amp <amp@ampcode.com>
@marcleblanc2
marcleblanc2 force-pushed the marc/executor-deploy-type branch from 1487fc1 to 01623a8 Compare November 25, 2026 23:10

This branch has not been deployed

No deployments
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.

1 participant