feat: add immediate and deferred provisioning modes

This commit is contained in:
2026-06-13 17:58:50 +03:30
parent d36b309c9c
commit 082e80606f
7 changed files with 160 additions and 18 deletions
+4 -3
View File
@@ -3,8 +3,8 @@ package driver
import (
"context"
"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/KubelanCloud/kks-csi-plugin/pkg/csi/provisioner"
"github.com/container-storage-interface/spec/lib/go/csi"
)
type ControllerServer struct {
@@ -33,8 +33,9 @@ func (s *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolu
}
vol, err := s.d.backend.CreateVolume(ctx, provisioner.CreateVolumeRequest{
Name: sanitizeVolumeName(req.GetName()),
SizeBytes: capacity,
Name: sanitizeVolumeName(req.GetName()),
SizeBytes: capacity,
Parameters: req.GetParameters(),
})
if err != nil {
return nil, internalError(err)