Skip to content

feat(helm): size cluster sandbox capacity from Helm values #5748

Closed

Description

@FrostGod

User Story

I run OpenShell on Kubernetes with the shared supervisor pool and need to set, from Helm values alone, how many sandboxes each supervisor runs, how many supervisors each gateway serves, and how many gateways run, so a cluster can grow toward a large target (such as 100,000 sandboxes) while default installs stay small.

Problem Statement

Pool limits are hardcoded: MAX_ASSIGNED_INSTANCES = 256 and MAX_POOL_INSTANCES = 4096 in openshell-supervisor-control, and the supervisor memory limit is fixed at 1Gi in templates/supervisor.yaml.

Impact / Why This Matters

None of these sizes can be changed without rebuilding images, so a pool tops out at 4,096 sandboxes whatever the cluster size.

Proposed Design

  • Gateway config [openshell.gateway.supervisor_pool]: max_instances_per_member (default 128, 16..=1024), max_members_per_gateway (default 32, 1..=64). Pool cap = gateway replicas × members × instances, ceiling 131072.
  • Never assign past a member's cap; place new sandboxes on the least-loaded member; size supervisor buffers from the configured cap.
  • Helm: supervisor.pool.maxInstancesPerMember, supervisor.pool.maxMembersPerGateway, supervisor.resources (requests 250m / 768Mi, limit 1.5Gi). Fail render when supervisor replicas exceed gateway.replicas * maxMembersPerGateway.
  • Defaults stay small: gateway 1, supervisor 2, autoscaling off (max 4). Add values-scale-100k.yaml (gateway 25, supervisor HPA 50..800).

Suggested UX

helm install openshell deploy/helm/openshell -f deploy/helm/openshell/values-scale-100k.yaml

Acceptance Criteria

  • Config parser and chart reject out-of-range values.
  • Per-member and pool caps are enforced.
  • Verified on a local cluster with 10-20 sandboxes across several Helm value sets (small per-member caps fill members and refuse the overflow).
  • test-supervisor-pool-scaling.sh and test-gateway-config-parser.sh cover the new values.

Alternatives Considered

Raising the constants keeps every install sized for the largest cluster and still needs a rebuild to change.

Activity

  1. self-assigned this
    on Nov 19, 2026
  2. changed the title [-]feat(helm): configurable shared supervisor pool limits for 100k-sandbox clusters[/-] [+]feat(helm): set sandboxes per supervisor, supervisors per gateway, and gateway count from Helm values[/+] on Nov 19, 2026
  3. changed the title [-]feat(helm): set sandboxes per supervisor, supervisors per gateway, and gateway count from Helm values[/-] [+]feat(helm): size cluster sandbox capacity from Helm values[/+] on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions