Skip to content

Conversation

@torredil
Copy link
Member

What type of PR is this?

/kind feature

What is this PR about? / Why do we need it?

Introduces a node-local static provisioning mode that enables a single cluster-wide PV/PVC to mount pre-attached, node-specific EBS volumes. When pods reference this PVC, each node independently mounts its own local EBS device and all pods on that node share the mount. This is useful for node-local caching scenarios where each node has a dedicated EBS volume already attached.

The feature is enabled via the --enable-node-local-volumes flag and uses a special local-ebs:// volume handle prefix to identify node-local volumes. The controller resolves the actual volume ID from the device name on each node to support ReadWriteMany access mode.

closes #2552

How was this change tested?

make update && make verify && make test
kubectl get pvc                                                                                               
NAME                   STATUS   VOLUME                CAPACITY   ACCESS MODES   STORAGECLASS   VOLUMEATTRIBUTESCLASS   AGE
node-local-cache-pvc   Bound    node-local-cache-pv   10Gi       RWX                           <unset>                 76s
kubectl get pv                                                                                               
NAME                  CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                          STORAGECLASS   VOLUMEATTRIBUTESCLASS   REASON   AGE
node-local-cache-pv   10Gi       RWX            Retain           Bound    default/node-local-cache-pvc                  <unset>                          106s
kubectl get pods -l app=cache-test -o wide                                                                    
NAME                          READY   STATUS    RESTARTS   AGE   IP               NODE                                           NOMINATED NODE   READINESS GATES
cache-test-6f7f5987bb-dztrr   1/1     Running   0          61s   192.168.19.49    ip-192-168-15-196.us-west-2.compute.internal   <none>           <none>
cache-test-6f7f5987bb-knx9q   1/1     Running   0          61s   192.168.76.200   ip-192-168-82-170.us-west-2.compute.internal   <none>           <none>
cache-test-6f7f5987bb-mvhjk   1/1     Running   0          62s   192.168.72.123   ip-192-168-82-170.us-west-2.compute.internal   <none>           <none>
cache-test-6f7f5987bb-wrllj   1/1     Running   0          61s   192.168.23.48    ip-192-168-15-196.us-west-2.compute.internal   <none>           <none>
kubectl logs ebs-csi-controller-59587c7bf7-7q4zc -n kube-system             
Defaulted container "ebs-plugin" out of: ebs-plugin, csi-provisioner, csi-attacher, csi-resizer, liveness-probe
I1019 22:57:51.693400       1 main.go:154] "Initializing metadata"
I1019 22:57:51.693748       1 metadata.go:66] "Attempting to retrieve instance metadata from IMDS"
I1019 22:57:51.698118       1 metadata.go:69] "Retrieved metadata from IMDS"
I1019 22:57:51.699515       1 driver.go:72] "Driver Information" Driver="ebs.csi.aws.com" Version="v1.51.0"
I1019 22:58:09.215535       1 controller.go:565] "ControllerPublishVolume: resolved node-local volume" volumeID="local-ebs://dev/xvdbz" realVolumeID="vol-0af977b743f8e9277" nodeID="i-050f3d45febd84cc5" deviceName="/dev/xvdbz"
I1019 22:58:09.215535       1 controller.go:565] "ControllerPublishVolume: resolved node-local volume" volumeID="local-ebs://dev/xvdbz" realVolumeID="vol-022eab8074d55582e" nodeID="i-0378636d42f6de9ce" deviceName="/dev/xvdbz"

Does this PR introduce a user-facing change?

Add node-local volume support, enabling a single cluster-wide PV/PVC to mount node-specific EBS volumes with ReadWriteMany access.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 20, 2025
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 20, 2025
@github-actions
Copy link

github-actions bot commented Oct 20, 2025

Code Coverage Diff

File Old Coverage New Coverage Delta
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud/cloud.go 86.8% 87.0% 0.2
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/driver/controller.go 83.5% 85.7% 2.2
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/driver/node.go 88.9% 88.0% -0.9

Copy link
Member

@mdzraf mdzraf left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 20, 2025
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 22, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from mdzraf. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@mdzraf mdzraf left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 23, 2025
@torredil
Copy link
Member Author

/test pull-aws-ebs-csi-driver-e2e-single-az

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support Node-Local Shared Cache Volume Access for Pods

4 participants