Skip to content

Commit 7dc106d

Browse files
authored
Merge pull request #1065 from k8s-infra-cherrypick-robot/cherry-pick-1059-to-release-1.21
[release-1.21] fix: nfs volume creation failure due to Microsoft.Storage.Global Service endpoint enabled
2 parents 804e35d + 809bfc9 commit 7dc106d

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
azure "sigs.k8s.io/cloud-provider-azure/pkg/provider"
3940
providerconfig "sigs.k8s.io/cloud-provider-azure/pkg/provider/config"
@@ -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)