From 956a946fe6c6654e7a0370a29ecf15312e3b876d Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Mon, 16 Oct 2023 11:31:01 +0000 Subject: [PATCH] fix: nfs volume creation failure due to global storage ep enabled --- pkg/blob/azure.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/blob/azure.go b/pkg/blob/azure.go index eeb742e18..8630776a0 100644 --- a/pkg/blob/azure.go +++ b/pkg/blob/azure.go @@ -34,6 +34,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" "k8s.io/klog/v2" + "k8s.io/utils/pointer" "sigs.k8s.io/cloud-provider-azure/pkg/auth" azure "sigs.k8s.io/cloud-provider-azure/pkg/provider" @@ -240,7 +241,7 @@ func (d *Driver) updateSubnetServiceEndpoints(ctx context.Context, vnetResourceG } serviceEndpoints := *subnet.SubnetPropertiesFormat.ServiceEndpoints for _, v := range serviceEndpoints { - if v.Service != nil && *v.Service == storageService { + if strings.HasPrefix(pointer.StringDeref(v.Service, ""), storageService) { storageServiceExists = true klog.V(4).Infof("serviceEndpoint(%s) is already in subnet(%s)", storageService, subnetName) break