Skip to content

Commit

Permalink
Merge pull request #762 from Ashley-wenyizha/master
Browse files Browse the repository at this point in the history
Revise awscredsuri validation to prefix check
  • Loading branch information
k8s-ci-robot authored Sep 9, 2022
2 parents 5648677 + 17d318d commit 21224b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
}
}

if f == "awscredsuri" {
if strings.HasPrefix(f, "awscredsuri") {
klog.Warning("awscredsuri mount option is not supported by efs-csi-driver.")
return nil, nil
continue
}

if !hasOption(mountOptions, f) {
Expand Down Expand Up @@ -425,6 +425,7 @@ func parseVolumeId(volumeId string) (fsid, subpath, apid string, err error) {
return
}

// Check and avoid adding duplicate mount options
func hasOption(options []string, opt string) bool {
for _, o := range options {
if o == opt {
Expand Down

0 comments on commit 21224b7

Please sign in to comment.