Skip to content

feat(k8s): support configuring workspace PVC storageClassName#2463

Open
loveRhythm1990 wants to merge 1 commit into
NVIDIA:mainfrom
loveRhythm1990:lr90/k8s-workspace-storage-class
Open

feat(k8s): support configuring workspace PVC storageClassName#2463
loveRhythm1990 wants to merge 1 commit into
NVIDIA:mainfrom
loveRhythm1990:lr90/k8s-workspace-storage-class

Conversation

@loveRhythm1990

Copy link
Copy Markdown
Contributor

Summary

The Kubernetes compute driver's default workspace PVC never set storageClassName, so on clusters with no default StorageClass the PVC stayed Pending and sandbox creation failed. This adds a driver-level workspace_storage_class option so operators can pin the workspace PVC to a specific StorageClass.

Related Issue

Closes #2442

Changes

  • Add workspace_storage_class: String to KubernetesComputeConfig (empty default preserves current behavior — omit storageClassName, use the cluster default StorageClass).
  • Thread it through SandboxPodParams into default_workspace_volume_claim_templates(), setting storageClassName on the generated PVC only when non-empty.
  • Read OPENSHELL_K8S_WORKSPACE_STORAGE_CLASS in the standalone driver main.rs, mirroring the existing storage-size env var.
  • Expose server.workspaceStorageClass in the Helm chart (values.yaml + gateway-config.yaml), regenerate the chart README.md via helm-docs.
  • Document the field in docs/reference/gateway-config.mdx and docs/reference/sandbox-compute-drivers.mdx.
  • Add a sandbox-PVC-pending troubleshooting row to the debug-openshell-cluster skill.

No proto/gRPC change — this is a driver-level default at the same granularity as the existing workspace_default_storage_size.

Testing

  • mise run pre-commit passes (one pre-existing, unrelated failure in openshell-supervisor-network::test_forward_public_ip_allowed_without_allowed_ips — an environment DNS-interception flake that also fails on clean main; untouched crate)
  • Unit tests added/updated — new tests cover storageClassName set when provided and omitted when empty (driver.rs), plus config default/serde-override (config.rs)
  • E2E tests added/updated (if applicable) — not run here; change is covered by unit tests and verified via helm template rendering both with and without the value set

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable) — user-facing docs + Helm README + debug skill updated

@copy-pr-bot

copy-pr-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

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.

The Kubernetes driver's default workspace PVC never set storageClassName,
so on clusters with no default StorageClass the PVC stayed Pending and
sandbox creation failed.

Add a workspace_storage_class option to KubernetesComputeConfig, wired
through SandboxPodParams into the generated volumeClaimTemplates. When
non-empty it sets storageClassName; empty preserves the current behavior
of relying on the cluster default StorageClass.

Expose it via the OPENSHELL_K8S_WORKSPACE_STORAGE_CLASS env var on both
the standalone driver and the embedded gateway runtime defaults, and via
the server.workspaceStorageClass Helm value.

Closes NVIDIA#2442

Signed-off-by: lr90 <qiuweimin@matrixorigin.cn>
@loveRhythm1990
loveRhythm1990 force-pushed the lr90/k8s-workspace-storage-class branch from 17a15d8 to 9a705b3 Compare July 24, 2026 11:45
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.

feat(k8s): support configuring storageClassName for the default workspace PVC

1 participant