Skip to content

Commit 61161b2

Browse files
committed
Skip search if the instance-pool is not set but the node-pool is (it is an OKE node).
1 parent 30e4b02 commit 61161b2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cluster-autoscaler/cloudprovider/oci/instancepools/oci_instance_pool_manager.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,11 @@ func (m *InstancePoolManagerImpl) GetInstancePoolForInstance(instanceDetails oci
327327
klog.V(4).Infof("GetInstancePoolForInstance instance-pool %s was not found", instanceDetails.InstancePoolID)
328328
return ip, nil
329329
}
330+
// Skip search if the instance-pool is not set but the node-pool is (it is an OKE node)
331+
if instanceDetails.NodePoolID != "" {
332+
klog.V(4).Infof("GetInstancePoolForInstance skipping further search for %s since instance-pool is empty and node-pool is set to %s", instanceDetails.InstancePoolID, instanceDetails.NodePoolID)
333+
return nil, errInstanceInstancePoolNotFound
334+
}
330335

331336
// This instance is not in the cache.
332337
// Try to resolve the pool ID and other details, though it may not be a member of an instance-pool we manage.

0 commit comments

Comments
 (0)