From 3af67f9b4d475c8665e5d228e556a60d8f4909e8 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Sat, 3 Aug 2024 03:20:23 +0000 Subject: [PATCH] fix: only last subnet is set in account ACL created by driver --- pkg/azurefile/controllerserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/azurefile/controllerserver.go b/pkg/azurefile/controllerserver.go index 4ad7df1f11..23d0311352 100644 --- a/pkg/azurefile/controllerserver.go +++ b/pkg/azurefile/controllerserver.go @@ -373,7 +373,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) subnet = strings.TrimSpace(subnet) vnetResourceID := d.getSubnetResourceID(vnetResourceGroup, vnetName, subnet) klog.V(2).Infof("set vnetResourceID(%s) for NFS protocol", vnetResourceID) - vnetResourceIDs = []string{vnetResourceID} + vnetResourceIDs = append(vnetResourceIDs, vnetResourceID) if err := d.updateSubnetServiceEndpoints(ctx, vnetResourceGroup, vnetName, subnet); err != nil { return nil, status.Errorf(codes.Internal, "update service endpoints failed with error: %v", err) }