Skip to content

Commit abb9d81

Browse files
committed
Use AttachNetworkInterfaceWithQueues, avoid if
1 parent f6885cd commit abb9d81

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

pkg/aws/eni/node.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -536,12 +536,7 @@ func (n *Node) CreateInterface(ctx context.Context, allocation *ipam.AllocationA
536536

537537
var attachmentID string
538538
for range maxAttachRetries {
539-
// TODO fold this into a single interface method
540-
if enaQueueCount != nil {
541-
attachmentID, err = n.manager.api.AttachNetworkInterfaceWithQueues(ctx, index, n.node.InstanceID(), eniID, enaQueueCount)
542-
} else {
543-
attachmentID, err = n.manager.api.AttachNetworkInterface(ctx, index, n.node.InstanceID(), eniID)
544-
}
539+
attachmentID, err = n.manager.api.AttachNetworkInterfaceWithQueues(ctx, index, n.node.InstanceID(), eniID, enaQueueCount)
545540

546541
// The index is already in use, this can happen if the local
547542
// list of ENIs is oudated. Retry the attachment to avoid

0 commit comments

Comments
 (0)