mirror of
https://github.com/open-webui/terminals.git
synced 2026-11-05 01:37:21 +00:00
[PR #32] [CLOSED] Add Kubernetes scheduling overrides for terminal pods #55
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/terminals#55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/terminals/pull/32
Author: @phillamb168
Created: 7/2/2026
Status: ❌ Closed
Base:
main← Head:feat/kubernetes-scheduling-overrides📝 Commits (1)
761aff2Add Kubernetes scheduling overrides for terminal pods📊 Changes
3 files changed (+52 additions, -0 deletions)
View changed files
📝
README.md(+2 -0)📝
operator/handler.py(+25 -0)📝
terminals/backends/kubernetes_operator.py(+25 -0)📄 Description
Description
(Previous PR was closed for CLA; CLA has now been completed. Sorry about that.)
Adds optional Kubernetes scheduling overrides for the
kubernetes-operatorbackend.This allows cluster operators to configure generated terminal pods and reset pods with:
TERMINALS_KUBERNETES_NODE_SELECTORTERMINALS_KUBERNETES_TOLERATIONSBoth values are JSON-encoded environment variables. If unset, behavior is unchanged.
Problem
The Kubernetes operator backend currently supports per-terminal images, resources, environment, persistence, and storage class selection, but it does not expose a way for cluster operators to constrain where generated terminal pods run.
For multi-tenant or resource-isolated deployments, operators may need terminal pods to run only on a dedicated node pool. A common example is isolating user terminal workloads from stateful platform services by using Kubernetes node labels and taints.
Without this, generated terminal pods can schedule onto any eligible cluster node.
Solution
This PR adds a small, opt-in scheduling override path:
TERMINALS_KUBERNETES_NODE_SELECTORand applies it to generated terminal pod specs asnodeSelector.TERMINALS_KUBERNETES_TOLERATIONSand applies it to generated terminal pod specs astolerations.Invalid JSON is ignored with a warning, preserving existing behavior.
Example
Compatibility
This is backwards compatible. If the environment variables are not set, generated pod specs are unchanged.
Testing
Related Issues
Fixes #31
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.