From 39165438dc620e4cd53a2bc86e1687884dc309be Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Fri, 17 Jan 2025 14:06:24 +0000 Subject: [PATCH] feat: support Provisioned v2 Azure File share sku --- pkg/azurefile/controllerserver.go | 5 +++++ test/e2e/dynamic_provisioning_test.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 {