feat: add network storage volume mount support for actors#282
Open
chenggui53 (chenggui53) wants to merge 1 commit into
Open
feat: add network storage volume mount support for actors#282chenggui53 (chenggui53) wants to merge 1 commit into
chenggui53 (chenggui53) wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
b4e55b2 to
2c83ef9
Compare
Add the ability to mount network storage (NFS, PVC, HostPath) into actor
sandboxes when starting actors. This enables actors to access shared
persistent storage.
## Changes
### CRD Types
- WorkerPool: Add StorageVolume type and storageVolumes field to declare
available storage infrastructure (NFS, PVC, HostPath sources)
- ActorTemplate: Add ActorVolume type and volumes field to declare mount
requirements (name, mountPath, subPath, readOnly)
### Proto
- atelet.proto: Add VolumeMount message and volume_mounts field to WorkloadSpec
### Controller
- WorkerPool controller injects storageVolumes as K8s volumes into worker pods
and mounts them at /var/lib/ateom-storage/<name>
### API Server
- workloadSpecFromActorTemplate converts ActorTemplate volumes to proto
- CallAteletRestoreStep validates volume refs against WorkerPool
### Atelet (OCI)
- resolveVolumeMounts converts proto mounts to host-path configs
- buildActorOCISpec creates OCI bind mounts for storage volumes
- createMountPoint creates mount point directories in rootfs
- Supports ${ACTOR_ID} placeholder in SubPath for per-actor isolation
### Validation
- ValidateVolumeMountPath ensures mount paths are absolute and safe
## Usage
WorkerPool (infrastructure):
storageVolumes:
- name: shared-data
nfs: {server: nfs.example.com, path: /exports/data}
ActorTemplate (workload):
volumes:
- name: shared-data
mountPath: /workspace
subPath: '${ACTOR_ID}/workspace'
2c83ef9 to
64d0edf
Compare
Collaborator
|
/assign |
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
Add the ability to mount network storage (NFS, PVC, HostPath) into actor sandboxes when starting actors. This enables actors to access shared persistent storage for workspace, model cache, and other use cases.
Closes #232
Related: #220, #172
Changes
CRD Types
StorageVolumetype andstorageVolumesfield to declare available storage infrastructure (NFS, PVC, HostPath sources)ActorVolumetype andvolumesfield to declare mount requirements (name, mountPath, subPath, readOnly)Proto
atelet.proto: AddVolumeMountmessage andvolume_mountsfield toWorkloadSpecController
/var/lib/ateom-storage/<name>API Server
workloadSpecFromActorTemplateconverts ActorTemplate volumes to proto VolumeMountsCallAteletRestoreStepvalidates volume refs against WorkerPool storageVolumesAtelet (OCI)
resolveVolumeMountsconverts proto mounts to host-path configsbuildActorOCISpeccreates OCI bind mounts for storage volumes${ACTOR_ID}placeholder in SubPath for per-actor isolationValidation
ValidateVolumeMountPathensures mount paths are absolute and safeUsage
Testing
go test ./...)