feat(k8s): support configuring workspace PVC storageClassName - #2463
feat(k8s): support configuring workspace PVC storageClassName#2463loveRhythm1990 wants to merge 1 commit into
Conversation
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>
17a15d8 to
9a705b3
Compare
|
we really need this fix and would greatly appreciate your help in pushing it forward.
|
|
/ok to test 9a705b3 |
drew
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Validation: This PR is project-valid because it implements the maintainer-triaged Kubernetes workspace PVC storageClassName request from #2442 with a bounded driver, gateway config, Helm, and docs change.
Head SHA: 9a705b3f4b639620e08862d4bc4d60f14a80a8d0
Review findings:
- No blocking findings remain. The independent code-only reviewer reported no actionable findings for this patch.
Docs: Fern reference docs and the Kubernetes driver documentation were updated for the new workspace_storage_class / server.workspaceStorageClass setting.
Tests: Unit coverage was added for config defaults/serde and PVC generation with set and empty storage classes. Because this changes Kubernetes driver behavior and Helm-rendered gateway config, test:e2e and test:e2e-kubernetes are required.
Next state: gator:watch-pipeline
|
/ok to test 9a705b3 |
|
Label |
|
Label |
|
Label |
|
Thanks for running the Kubernetes e2e. I've seen the kubernetes-ha-e2e failure and I'm looking A few notes on where things stand:
I'm planning to reproduce this locally with the HA values (ci/values-high-availability.yaml + the |
Summary
The Kubernetes compute driver's default workspace PVC never set
storageClassName, so on clusters with no defaultStorageClassthe PVC stayedPendingand sandbox creation failed. This adds a driver-levelworkspace_storage_classoption so operators can pin the workspace PVC to a specificStorageClass.Related Issue
Closes #2442
Changes
workspace_storage_class: StringtoKubernetesComputeConfig(empty default preserves current behavior — omitstorageClassName, use the cluster defaultStorageClass).SandboxPodParamsintodefault_workspace_volume_claim_templates(), settingstorageClassNameon the generated PVC only when non-empty.OPENSHELL_K8S_WORKSPACE_STORAGE_CLASSin the standalone drivermain.rs, mirroring the existing storage-size env var.server.workspaceStorageClassin the Helm chart (values.yaml+gateway-config.yaml), regenerate the chartREADME.mdvia helm-docs.docs/reference/gateway-config.mdxanddocs/reference/sandbox-compute-drivers.mdx.debug-openshell-clusterskill.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-commitpasses (one pre-existing, unrelated failure inopenshell-supervisor-network::test_forward_public_ip_allowed_without_allowed_ips— an environment DNS-interception flake that also fails on cleanmain; untouched crate)storageClassNameset when provided and omitted when empty (driver.rs), plus config default/serde-override (config.rs)helm templaterendering both with and without the value setChecklist