Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanrainer committed Aug 12, 2023
1 parent 8c6f5f5 commit 10ffc84
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pkg/driver/access_point_provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/container-storage-interface/spec/lib/go/csi"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/kubernetes-sigs/aws-efs-csi-driver/pkg/cloud"
)
Expand Down
8 changes: 1 addition & 7 deletions pkg/driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ package driver
import (
"context"
"fmt"
"os"
"strings"

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/kubernetes-sigs/aws-efs-csi-driver/pkg/cloud"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"k8s.io/klog/v2"
Expand Down Expand Up @@ -64,10 +62,6 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
return nil, status.Error(codes.InvalidArgument, "Volume name not provided")
}

// Volume size is required to match PV to PVC by k8s.
// Volume size is not consumed by EFS for any purposes.
volSize := req.GetCapacityRange().GetRequiredBytes()

volCaps := req.GetVolumeCapabilities()
if len(volCaps) == 0 {
return nil, status.Error(codes.InvalidArgument, "Volume capabilities not provided")
Expand Down Expand Up @@ -103,7 +97,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)

if err != nil {
d.fsIdentityManager.ReleaseGid(volumeParams[FsId], gid)
return nil, status.Errorf(codes.Internal, "Could not provision underlying storage: %v", err)
return nil, err
}

return &csi.CreateVolumeResponse{
Expand Down
2 changes: 1 addition & 1 deletion pkg/driver/directory_provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/google/uuid"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/kubernetes-sigs/aws-efs-csi-driver/pkg/cloud"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/driver/fs_identifier_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"k8s.io/klog"
"k8s.io/klog/v2"
)

type FileSystemIdentityManager struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/driver/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/container-storage-interface/spec/lib/go/csi"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/kubernetes-sigs/aws-efs-csi-driver/pkg/cloud"
)
Expand Down

0 comments on commit 10ffc84

Please sign in to comment.