Skip to content

Commit fd159f0

Browse files
committed
Cherry-pick fixes
1 parent 11716d0 commit fd159f0

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

pkg/cloudprovider/providers/oci/load_balancer_spec_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10662,15 +10662,14 @@ func Test_getNetworkLoadbalancerSubnets(t *testing.T) {
1066210662
}
1066310663

1066410664
for name, tc := range testCases {
10665-
logger := zap.L()
1066610665
t.Run(name, func(t *testing.T) {
1066710666
cp.config = &providercfg.Config{
1066810667
LoadBalancer: &providercfg.LoadBalancerConfig{
1066910668
Subnet1: tc.defaultSubnetOne,
1067010669
Subnet2: tc.defaultSubnetTwo,
1067110670
},
1067210671
}
10673-
subnets, err := cp.getNetworkLoadbalancerSubnets(context.Background(), logger.Sugar(), tc.service)
10672+
subnets, err := cp.getNetworkLoadbalancerSubnets(tc.service)
1067410673
if !reflect.DeepEqual(subnets, tc.subnets) {
1067510674
t.Errorf("Expected \n%+v\nbut got\n%+v", tc.subnets, subnets)
1067610675
}

pkg/csi/driver/bv_node.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -792,9 +792,9 @@ func (d BlockVolumeNodeDriver) NodeGetInfo(ctx context.Context, req *csi.NodeGet
792792
return nil, status.Error(codes.Internal, "Failed to get availability domain of node from kube api server.")
793793
}
794794
}
795-
segments := map[string]string {
796-
kubeAPI.LabelZoneFailureDomain: d.nodeMetadata.AvailabilityDomain,
797-
kubeAPI.LabelTopologyZone: d.nodeMetadata.AvailabilityDomain,
795+
segments := map[string]string{
796+
kubeAPI.LabelZoneFailureDomain: d.nodeMetadata.AvailabilityDomain,
797+
kubeAPI.LabelTopologyZone: d.nodeMetadata.AvailabilityDomain,
798798
}
799799

800800
//set full ad name in segments only for IPv6 single stack
@@ -815,10 +815,7 @@ func (d BlockVolumeNodeDriver) NodeGetInfo(ctx context.Context, req *csi.NodeGet
815815

816816
// make sure that the driver works on this particular AD only
817817
AccessibleTopology: &csi.Topology{
818-
Segments: map[string]string{
819-
kubeAPI.LabelZoneFailureDomain: ad,
820-
kubeAPI.LabelTopologyZone: ad,
821-
},
818+
Segments: segments,
822819
},
823820
}, nil
824821
}

0 commit comments

Comments
 (0)