Skip to content

ateapi: add mount_options to ExternalVolumeClass and forward to CSI MountFlags - #3776

Open
Vu Le (lekhoavu2909) wants to merge 17 commits into
agent-substrate:mainfrom
lekhoavu2909:evc-pr5b-mount-options
Open

Vu Le (lekhoavu2909) wants to merge 17 commits into
agent-substrate:mainfrom
lekhoavu2909:evc-pr5b-mount-options

Conversation

@lekhoavu2909

@lekhoavu2909 Vu Le (lekhoavu2909) commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Adds mount_options to ExternalVolumeClass and passes them to the CSI driver as VolumeCapability.Mount.MountFlags, so drivers that need mount flags (e.g. nfsvers=4.1) work. Templates that use storage_class_name now also get the StorageClass's mountOptions, which were previously ignored. Stacked on #3774; code-wise it depends only on #3752.

  • add proto, validation, codegen, apitool example
  • add controlapi resolver and ExternalVolumeStatus wiring
  • add runtime path: ateletpb, workload_spec, atelet, and CSI MountFlags

Part of #3754

AI use: AI-assisted, I reviewed and tested it.

no new API requirement, but StorageClass mountOptions are now honored where they were ignored before. Volumes already provisioned are unaffected.

  • Tests pass
  • Docs updated

regenerate ateapi.go, and register ExternalVolumeClass in apitool
TestBuild_Annotations.

Signed-off-by: Vu Le <vulk@google.com>
controlapi.ServiceImpl store pass-throughs

Signed-off-by: Vu Le <vulk@google.com>
table truncation and driver_name column test

Signed-off-by: Vu Le <vulk@google.com>
Signed-off-by: Vu Le <vulk@google.com>
Signed-off-by: Vu Le <vulk@google.com>
apitool example

Signed-off-by: Vu Le <vulk@google.com>
Signed-off-by: Vu Le <vulk@google.com>
Signed-off-by: Vu Le <vulk@google.com>
Signed-off-by: Vu Le <vulk@google.com>
Signed-off-by: Vu Le <vulk@google.com>
Signed-off-by: Vu Le <vulk@google.com>
Signed-off-by: Vu Le <vulk@google.com>
// +k8s:listType=atomic
// +k8s:eachVal=+k8s:minLength=1
// +k8s:eachVal=+k8s:maxLength=256
repeated string mount_options = 5;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field 5 collides with #3746 (external_volume_name) and #3102; whichever PR merges second will bump to 6

VolumeType: sc.Provisioner,
VolumeType: class.driver,
VolumeContext: resp.VolumeContext,
MountOptions: class.mountOptions,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createActorVolumes constructs a fresh ExternalVolumeStatus when recording StorageVolumeId and VolumeContext. Omitting MountOptions here would drop what initialExternalVolumes set on CreateActor.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matches Kubernetes CSI behavior (and csi-driver-nfs, which reads mountFlags in NodePublishVolume) without widening volume.CreateVolumeRequest or AttachVolumeRequest. If a future CSI driver requires MountFlags on CreateVolume or ControllerPublishVolume, those request structs can carry MountOptions then.

This branch has not been deployed

No deployments
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.

1 participant