diff --git a/pkg/azurefile/controllerserver.go b/pkg/azurefile/controllerserver.go index 6a61bfa663..fd83c18d4f 100644 --- a/pkg/azurefile/controllerserver.go +++ b/pkg/azurefile/controllerserver.go @@ -404,6 +404,11 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) } } + // use v2 account kind for v2 sku + if strings.Contains(strings.ToLower(sku), "v2") { + accountKind = string(armstorage.KindFileStorage) + } + // replace pv/pvc name namespace metadata in fileShareName validFileShareName := replaceWithMap(fileShareName, fileShareNameReplaceMap) if validFileShareName == "" { diff --git a/test/e2e/dynamic_provisioning_test.go b/test/e2e/dynamic_provisioning_test.go index 235b9b2823..7b3277d570 100644 --- a/test/e2e/dynamic_provisioning_test.go +++ b/test/e2e/dynamic_provisioning_test.go @@ -206,7 +206,7 @@ var _ = ginkgo.Describe("Dynamic Provisioning", func() { } scParameters := map[string]string{ - "skuName": "Standard_LRS", + "skuName": "StandardV2_LRS", "secretNamespace": "kube-system", } if !isUsingInTreeVolumePlugin {