Skip to content

Commit d28ece6

Browse files
authored
Merge pull request #254 from pohly/csi-ephemeral-volume-fix
CSI ephemeral inline volume testing + fix
2 parents 35c63f9 + 93d4ef8 commit d28ece6

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

deploy/kubernetes-1.18/test-driver.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ DriverInfo:
2020
singleNodeVolume: true
2121
snapshotDataSource: true
2222
topology: true
23+
InlineVolumes:
24+
- shared: true

deploy/kubernetes-1.20/test-driver.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ DriverInfo:
2020
singleNodeVolume: true
2121
snapshotDataSource: true
2222
topology: true
23+
InlineVolumes:
24+
- shared: true

deploy/kubernetes-distributed/test-driver.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ DriverInfo:
1616
persistence: true
1717
singleNodeVolume: true
1818
topology: true
19+
InlineVolumes:
20+
- shared: true

pkg/hostpath/nodeserver.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ func (hp *hostPath) NodePublishVolume(ctx context.Context, req *csi.NodePublishV
6464
volID := req.GetVolumeId()
6565
volName := fmt.Sprintf("ephemeral-%s", volID)
6666
kind := req.GetVolumeContext()[storageKind]
67-
vol, err := hp.createVolume(req.GetVolumeId(), volName, maxStorageCapacity, mountAccess, ephemeralVolume, kind)
67+
// Configurable size would be nice. For now we use a small, fixed volume size of 100Mi.
68+
volSize := int64(100 * 1024 * 1024)
69+
vol, err := hp.createVolume(req.GetVolumeId(), volName, volSize, mountAccess, ephemeralVolume, kind)
6870
if err != nil && !os.IsExist(err) {
6971
glog.Error("ephemeral mode failed to create volume: ", err)
7072
return nil, err

0 commit comments

Comments
 (0)