Skip to content

feat(supervisor): per-org placement overrides for run pods - #4655

Merged
myftija merged 7 commits into
mainfrom
feat/org-placement-overrides-tri-13357
Aug 18, 2026
Merged

feat(supervisor): per-org placement overrides for run pods#4655
myftija merged 7 commits into
mainfrom
feat/org-placement-overrides-tri-13357

Conversation

@myftija

@myftija myftija commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

The supervisor now supports routing an organization's runs to specific nodes. KUBERNETES_ORG_PLACEMENT_OVERRIDES takes JSON keyed by the internal org ID, adding node selector entries and tolerations to that org's run pods, e.g. to route an org onto a dedicated, tainted node pool:

{"<orgId>": {"nodeSelector": {"pool": "dedicated"}, "tolerations": "dedicated=runs:NoSchedule"}}

The node selector merges over the defaults (the override wins on key collision, with a warning logged). Tolerations append to the existing runner and scheduled-run sets. Overrides are validated at startup similar to KUBERNETES_RUNNER_TOLERATIONS.

Exposed in the Helm chart as supervisor.config.kubernetes.orgPlacementOverrides, where tolerations can also be given as a list.

KUBERNETES_ORG_PLACEMENT_OVERRIDES takes JSON keyed by org id, adding
node selector entries and tolerations to that org's run pods so an
operator can pin an org onto a dedicated node pool. Validated at
startup so a typo fails fast instead of rejecting every pod create.
Blank env value now means no overrides instead of failing startup.
Tolerations also accept an array of entries to match the Helm list
shape, scalar node selector values are coerced to strings, keys and
values are trimmed, and empty selector values are rejected since they
would pin the org to nothing. Startup fails when an override pins the
large-machine pool while non-large presets are required to stay off
it. The supervisor logs configured override orgs at startup and warns
when an override replaces a default node selector key.
@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2866fc9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e572c61b-8d4c-4adb-8b88-7bd49b56a758

📥 Commits

Reviewing files that changed from the base of the PR and between 062d2b6 and 2866fc9.

📒 Files selected for processing (1)
  • docs/self-hosting/env/supervisor.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/self-hosting/env/supervisor.mdx

Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (8)
  • GitHub Check: CodeQL
  • GitHub Check: typecheck / typecheck
  • GitHub Check: code-quality / code-quality
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (actions)
  • GitHub Check: audit
  • GitHub Check: audit
  • GitHub Check: lint-and-test

Walkthrough

The supervisor now accepts KUBERNETES_ORG_PLACEMENT_OVERRIDES as organization-keyed JSON. It validates Kubernetes node selectors and tolerations, rejects conflicting large-machine placement, and applies valid overrides to run pods. Node selectors merge over placement tags, and organization tolerations append for all run types. Helm values, deployment templating, documentation, tests, and the feature changelog now cover the setting.

Merge Risk: ⚪ Minimal · up to 2866f

The supervisor adds per-organization pod placement overrides with startup validation and Helm configuration support; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the implementation but omits the required issue reference, checklist, testing, changelog, and screenshots sections. Add the required template sections, include the issue reference and checklist, document testing steps, provide a changelog entry, and state whether screenshots apply.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: per-organization placement overrides for supervisor run pods.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/org-placement-overrides-tri-13357

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🧭 Helm Chart Prerelease Published

Version: 4.5.11-pr4655.2866fc9

Install:

helm upgrade --install trigger \
  oci://ghcr.io/triggerdotdev/charts/trigger \
  --version "4.5.11-pr4655.2866fc9"

⚠️ This is a prerelease for testing. Do not use in production.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

…t wording

The override lookup is exact, so a padded or blank org key would parse
at startup and then never match a run. The release note now describes
the user-visible result and the docs row states the selector-override
vs toleration-append semantics separately.
devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread docs/self-hosting/env/supervisor.mdx Outdated
@myftija
myftija enabled auto-merge (squash) August 18, 2026 12:12
@myftija
myftija merged commit 7e67700 into main Aug 18, 2026
28 checks passed
@myftija
myftija deleted the feat/org-placement-overrides-tri-13357 branch August 18, 2026 12:16
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