Skip to content

Commit 956a946

Browse files
andyzhangxk8s-infra-cherrypick-robot
authored andcommitted
fix: nfs volume creation failure due to global storage ep enabled
1 parent 1a2a723 commit 956a946

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/blob/azure.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
"k8s.io/client-go/rest"
3535
"k8s.io/client-go/tools/clientcmd"
3636
"k8s.io/klog/v2"
37+
"k8s.io/utils/pointer"
3738

3839
"sigs.k8s.io/cloud-provider-azure/pkg/auth"
3940
azure "sigs.k8s.io/cloud-provider-azure/pkg/provider"
@@ -240,7 +241,7 @@ func (d *Driver) updateSubnetServiceEndpoints(ctx context.Context, vnetResourceG
240241
}
241242
serviceEndpoints := *subnet.SubnetPropertiesFormat.ServiceEndpoints
242243
for _, v := range serviceEndpoints {
243-
if v.Service != nil && *v.Service == storageService {
244+
if strings.HasPrefix(pointer.StringDeref(v.Service, ""), storageService) {
244245
storageServiceExists = true
245246
klog.V(4).Infof("serviceEndpoint(%s) is already in subnet(%s)", storageService, subnetName)
246247
break

0 commit comments

Comments
 (0)