feat(k8s): make default workspace PVC storage size configurable#1436
Open
sjenning wants to merge 1 commit into
Open
feat(k8s): make default workspace PVC storage size configurable#1436sjenning wants to merge 1 commit into
sjenning wants to merge 1 commit into
Conversation
|
Label |
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.
e574986 to
d713ab9
Compare
Collaborator
|
/ok to test d713ab9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Kubernetes driver hardcoded the workspace PVC size to 2Gi with no override mechanism. This adds a
workspace_default_storage_sizeconfig field so operators can tune it via TOML config, Helm values, or theOPENSHELL_K8S_WORKSPACE_DEFAULT_STORAGE_SIZEenvironment variable.Changes
workspace_default_storage_sizefield toKubernetesComputeConfigwith a default of"2Gi"DEFAULT_WORKSPACE_STORAGE_SIZEconst inconfig.rs(single source of truth)default_workspace_volume_claim_templates()to accept the configured sizeSandboxPodParamsfrom the driver configOPENSHELL_K8S_WORKSPACE_DEFAULT_STORAGE_SIZEenv var override in the gateway server and standalone K8s driver binaryserver.workspaceDefaultStorageSizeHelm value with conditional TOML renderingConfiguration
Set via TOML config:
Set via Helm:
Set via environment variable:
Testing
mise run pre-commitpasses (pre-existing markdown lint failure in unrelated file)cargo test -p openshell-driver-kubernetes— 37 tests passcargo test -p openshell-server— all tests passhelm template . --set server.workspaceDefaultStorageSize=10Girenders correctlyChecklist