Skip to content

fix(codeapi-chart): support sandbox runner scale to zero#11

Draft
rschlaefli wants to merge 1 commit into
mainfrom
codeapi-scale-zero-chart-fix
Draft

fix(codeapi-chart): support sandbox runner scale to zero#11
rschlaefli wants to merge 1 commit into
mainfrom
codeapi-scale-zero-chart-fix

Conversation

@rschlaefli

@rschlaefli rschlaefli commented Jul 3, 2026

Copy link
Copy Markdown
Member

What This Fixes

This PR adds a chart value for CodeAPI deployments where codeapi-sandbox-runner is scaled from zero by an external scaler such as KEDA.

By default the chart still renders the existing service-worker init container that waits for codeapi-sandbox-runner. For scale-to-zero deployments, set:

workerSandbox:
  serviceWorker:
    waitForSandboxRunner: false

That lets the service-worker start while the sandbox runner is at zero, so queued/active BullMQ state can wake the runner through the platform scaler.

Branch Coverage

  • Base: main
  • Head: dc1e56a
  • Reviewed: 1 commit, 3 files changed.
  • Covered: chart value default, conditional init container rendering, README deployment note.

Verification

Current head:

  • GitHub Actions API Unit Tests on dc1e56a -> passed.
  • GitHub Actions Service Unit Tests on dc1e56a -> passed.
  • helm template codeapi helm/codeapi -n codeapi --set executionManifest.privateKey=dummy --set executionManifest.publicKey=dummy | rg "wait-for-sandbox-runner|wait-for-redis" -> default renders both init containers.
  • helm template codeapi helm/codeapi -n codeapi --set executionManifest.privateKey=dummy --set executionManifest.publicKey=dummy --set workerSandbox.serviceWorker.waitForSandboxRunner=false | rg "wait-for-sandbox-runner|wait-for-redis" -> renders wait-for-redis only.
  • git diff --check -> pass.

Security / Privacy

  • Review: chart-only deployment behavior change.
  • Result: no new images, secrets, RBAC, permissions, network paths, or runtime code.
  • Sensitive data: no secret values included.

Blocking Before Merge

  • Reviewer accepts the scale-to-zero chart value.

Follow-Up After Merge

  • Update df-cloud CodeAPI target revision to the merged commit.
  • Merge the helm-charts companion change that disables this wait and adds BullMQ active KEDA triggers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant