Skip to content

fix(helm): set control plane resource budgets - #6018

Merged
SDAChess merged 3 commits into
mainfrom
fix/6016-resource-defaults/SDAChess
Nov 27, 2026
Merged

SDAChess merged 3 commits into
mainfrom
fix/6016-resource-defaults/SDAChess

Conversation

@SDAChess

@SDAChess SDAChess commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Set configurable gateway and shared-supervisor CPU/memory budgets instead of leaving both unbounded. This removes the missing-resource Trivy findings from all scanned chart profiles.

Stack: #6018 → #6020 → #6021 (native stack #6037, based on main).

Related Issue

Closes #6016

Changes

  • Gateway requests 500m CPU / 512Mi, limits 2 CPUs / 2Gi; shared supervisors request 250m / 768Mi, limits 1 CPU / 1.5Gi.
  • Preserve explicit overrides and null removal, with chart coverage for both gateway workload kinds and supervisor budgets.
  • Explain sizing for log retention, traffic and failover. The 10,000-sandbox example explicitly leaves gateway limits to the operator.

The requests follow existing chart guidance. The supplied performance measurements at 624aceea3 show roughly 414m gateway CPU and 237m supervisor CPU per 100 sandboxes under mixed load; separate heap profiles show about 4Mi of retained gateway log-tail heap per used sandbox. These inform initial budgets, not a maximum supported workload or a new capacity guarantee.

Release Notes

Upgrades that adopt chart defaults now apply resource requests and limits. Existing installs that never set resources gain a 2Gi gateway memory limit and can be OOM-killed if their current usage exceeds it. Helm also merges requests-only overrides with default limits: for example, resources.requests.memory=4Gi retains the 2Gi limit and Kubernetes rejects the Pod because its request exceeds its limit. Set matching limits for your workload or remove limits explicitly before upgrading. Empty maps retain defaults; use resources: null / supervisor.resources: null to omit budgets, or set their limits to null to omit limits.

Testing

  • Verified the requests-only 4Gi example retains the default 2Gi limit; published upgrade guidance now warns about this and OOM risk.

  • 519 gateway chart tests and 7 workspace tests pass.

  • All chart fixture lint/render checks and generated README checks pass.

  • Complete mise run helm:test passes, including the Rust loader, resource coherence, ownership and pool scaling checks. The first CI run exposed an obsolete shell assertion expecting no supervisor resources; it now verifies defaults and explicit removal.

  • Full-severity Trivy scans across defaults, static manifests and 14 profiles remove KSV-0011/0015/0016/0018 with no new findings.

  • Markdown lint passes; Fern reports zero errors and three existing warnings.

  • Combined stack including the merged gateway filesystem hardening: 524 gateway tests, 7 workspace tests and all Helm lint/render checks pass.

  • Combined-stack core E2E, Kubernetes HA and credential-driver E2E pass on ci(trivy): remove obsolete bootstrap manifests #6021 at fb6dfd608 (CI run).

  • Restored the native stack on main at 2cd4f5384; range-diff confirms every patch is unchanged. The combined tree matches the previously validated tree apart from two upstream CI workflow changes. Local validation: 524 gateway / 7 workspace tests, complete Helm tests, lint and generated README checks, Markdown lint and Fern build, and full-severity Trivy comparison across all 16 scan targets with no new findings.

  • Refreshed-head CI.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Deployment guidance updated

@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 26, 2026
@github-actions

Copy link
Copy Markdown

@SDAChess SDAChess added area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. topic:kubernetes Kubernetes operators, CRDs, deployment controllers, and native Kubernetes API integration. topic:operability Installing/configuring deployments, upgrades, backup/restore, diagnostics, and maintenance. topic:performance Startup time, latency, throughput, overhead, scalability, benchmarking, and rate limiting. topic:security Vulnerability management, security analysis/auditing, bypass detection, and abuse prevention. labels Nov 26, 2026
@alangou

alangou commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Two upgrade effects the release note should state:

  • The new 2Gi gateway memory limit can OOM-kill existing installs with many sandboxes that never set resources.
  • A requests-only override above the default limits (e.g. resources.requests.memory=4Gi) now renders request > limit.

Signed-off-by: @alangou

@SDAChess
SDAChess force-pushed the fix/6016-resource-defaults/SDAChess branch from ea5022e to 40b87ab Compare November 27, 2026 11:12
alangou
alangou previously approved these changes Nov 27, 2026
@SDAChess
SDAChess added this pull request to stack #6034 November 27, 2026 11:51
Base automatically changed from fix/6013-trivy-hardening/SDAChess to main November 27, 2026 12:43
@SDAChess
SDAChess dismissed alangou’s stale review November 27, 2026 12:43

The merge-base changed after approval.

@SDAChess
SDAChess removed this pull request from stack #6034 November 27, 2026 12:57
@SDAChess SDAChess added test:e2e Requires end-to-end coverage test:e2e-kubernetes Requires Kubernetes end-to-end coverage labels Nov 27, 2026
@SDAChess
SDAChess force-pushed the fix/6016-resource-defaults/SDAChess branch from 40b87ab to eb4b6d1 Compare November 27, 2026 12:58
@SDAChess
SDAChess requested a review from alangou November 27, 2026 12:58
@SDAChess

Copy link
Copy Markdown
Contributor Author

@alangou please reapprove the final rebased head. #6014 is now merged, and this PR targets main independently to avoid further parent-merge retargets. git range-diff confirms the reviewed patches are unchanged. Combined local Helm tests (524 gateway + 7 workspace), lint, generated README, documentation and full-severity Trivy comparison pass. Fresh CI is running; the resource-budget PR #6018 carries the full E2E labels.

Signed-off-by: Simon Scatton <sscatton@nvidia.com>
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
@SDAChess
SDAChess added this pull request to stack #6037 November 27, 2026 13:18
@SDAChess SDAChess removed test:e2e Requires end-to-end coverage test:e2e-kubernetes Requires Kubernetes end-to-end coverage labels Nov 27, 2026
@SDAChess
SDAChess force-pushed the fix/6016-resource-defaults/SDAChess branch from eb4b6d1 to f35ed22 Compare November 27, 2026 13:18
@SDAChess
SDAChess enabled stacked auto-merge November 27, 2026 13:20
@SDAChess
SDAChess disabled stacked auto-merge November 27, 2026 13:20
@SDAChess
SDAChess enabled stacked auto-merge November 27, 2026 13:21
@SDAChess
SDAChess added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit fd18472 Nov 27, 2026
120 of 121 checks passed
@SDAChess
SDAChess deleted the fix/6016-resource-defaults/SDAChess branch November 27, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. state:accepted A maintainer decided OpenShell should pursue this issue topic:kubernetes Kubernetes operators, CRDs, deployment controllers, and native Kubernetes API integration. topic:operability Installing/configuring deployments, upgrades, backup/restore, diagnostics, and maintenance. topic:performance Startup time, latency, throughput, overhead, scalability, benchmarking, and rate limiting. topic:security Vulnerability management, security analysis/auditing, bypass detection, and abuse prevention.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(helm): set gateway and supervisor resource defaults

2 participants