Skip to content

Commit

Permalink
fix: nfs volume creation failure due to global storage ep enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx authored and k8s-infra-cherrypick-robot committed Oct 17, 2023
1 parent 67e7fc7 commit 1b23f8e
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 1b23f8e

Please sign in to comment.