Skip to content

Commit

Permalink
Merge pull request #1509 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…1505-to-release-1.26

[release-1.26] fix: nfs volume creation failure due to Microsoft.Storage.Global Service endpoint enabled
  • Loading branch information
k8s-ci-robot committed Oct 17, 2023
2 parents 67e7fc7 + 1b23f8e commit 7d1997a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/azurefile/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog/v2"
"k8s.io/utils/pointer"

azure "sigs.k8s.io/cloud-provider-azure/pkg/provider"
)
Expand Down Expand Up @@ -208,7 +209,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
Expand Down

0 comments on commit 7d1997a

Please sign in to comment.