Skip to content

feat(k8s): make default workspace PVC storage size configurable#1436

Open
sjenning wants to merge 1 commit into
NVIDIA:mainfrom
sjenning:feat/configurable-workspace-storage-size
Open

feat(k8s): make default workspace PVC storage size configurable#1436
sjenning wants to merge 1 commit into
NVIDIA:mainfrom
sjenning:feat/configurable-workspace-storage-size

Conversation

@sjenning
Copy link
Copy Markdown
Contributor

Summary

The Kubernetes driver hardcoded the workspace PVC size to 2Gi with no override mechanism. This adds a workspace_default_storage_size config field so operators can tune it via TOML config, Helm values, or the OPENSHELL_K8S_WORKSPACE_DEFAULT_STORAGE_SIZE environment variable.

Changes

  • Added workspace_default_storage_size field to KubernetesComputeConfig with a default of "2Gi"
  • Moved the default into a public DEFAULT_WORKSPACE_STORAGE_SIZE const in config.rs (single source of truth)
  • Parameterized default_workspace_volume_claim_templates() to accept the configured size
  • Threaded the value through SandboxPodParams from the driver config
  • Added OPENSHELL_K8S_WORKSPACE_DEFAULT_STORAGE_SIZE env var override in the gateway server and standalone K8s driver binary
  • Added server.workspaceDefaultStorageSize Helm value with conditional TOML rendering
  • Added unit tests for default value, serde override, and VCT generation

Configuration

Set via TOML config:

[openshell.drivers.kubernetes]
workspace_default_storage_size = "10Gi"

Set via Helm:

server:
  workspaceDefaultStorageSize: "10Gi"

Set via environment variable:

OPENSHELL_K8S_WORKSPACE_DEFAULT_STORAGE_SIZE=10Gi

Testing

  • mise run pre-commit passes (pre-existing markdown lint failure in unrelated file)
  • Unit tests added/updated
  • cargo test -p openshell-driver-kubernetes — 37 tests pass
  • cargo test -p openshell-server — all tests pass
  • Helm template verified: helm template . --set server.workspaceDefaultStorageSize=10Gi renders correctly
  • E2E tests added/updated (not applicable — no running cluster needed)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 18, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@TaylorMutch TaylorMutch added the test:e2e-kubernetes Requires Kubernetes end-to-end coverage label May 18, 2026
@TaylorMutch TaylorMutch self-assigned this May 18, 2026
@github-actions
Copy link
Copy Markdown

Label test:e2e-kubernetes applied, but pull-request/1436 is at {"messa while the PR head is e574986. A maintainer needs to comment /ok to test e574986dc62841200fc959139178c0921949c260 to refresh the mirror. Once the mirror catches up, re-run Branch Kubernetes E2E from the Actions tab.

@TaylorMutch
Copy link
Copy Markdown
Collaborator

/ok to test e574986

The Kubernetes driver hardcoded the workspace PVC size to 2Gi. Add a
workspace_default_storage_size field to KubernetesComputeConfig so
operators can tune it via TOML config, Helm values, or the
OPENSHELL_K8S_WORKSPACE_DEFAULT_STORAGE_SIZE environment variable.
@sjenning sjenning force-pushed the feat/configurable-workspace-storage-size branch from e574986 to d713ab9 Compare May 19, 2026 02:18
@TaylorMutch
Copy link
Copy Markdown
Collaborator

/ok to test d713ab9

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

Labels

test:e2e-kubernetes Requires Kubernetes end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants