Skip to content

Commit 46eecdf

Browse files
committed
Fix find node from scaling groups would cause panic issue
1 parent 1f7ea9f commit 46eecdf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cluster-autoscaler/cloudprovider/huaweicloud/huaweicloud_cloud_provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ func (hcp *huaweicloudCloudProvider) NodeGroupForNode(node *apiv1.Node) (cloudpr
121121
return nil, err
122122
}
123123

124-
for i := range instances {
125-
if instanceID == instances[i].Id {
124+
for j := range instances {
125+
if instanceID == instances[j].Id {
126126
pinnedGroup := hcp.autoScalingGroup[i]
127127
return &pinnedGroup, nil
128128
}

0 commit comments

Comments
 (0)