aws: Filter ENI list by VPC#15903
Conversation
60417d3 to
630665f
Compare
| request := &ec2.DescribeNetworkInterfacesInput{ | ||
| Filters: append(filters, statusFilter), | ||
| } | ||
| if vpcID != "" { |
There was a problem hiding this comment.
actually, here we may as well return. there's no ENI without VPC and it's probably valid for most other things.
| } | ||
|
|
||
| func ListRouteTables(cloud fi.Cloud, clusterName string) ([]*resources.Resource, error) { | ||
| func ListRouteTables(cloud fi.Cloud, vpcID, clusterName string) ([]*resources.Resource, error) { |
There was a problem hiding this comment.
I see that many of the functions are now taking vpc-id which is nice, not just in the eni.go file but also in other files like sqs, routetable etc. What I'm trying to understand is, are we not using these functions anywhere else in the project ? Because I don't see any consumers of these functions are being changed to accommodate this change i.e; the callers ?
There was a problem hiding this comment.
These are used only on cleanup, which is quite demanding.
vpc-id can be used as a filter later in other places. For now, let's see how the review goes.
|
Thanks for adding these changes very quickly, as this will make life easier for us internally on large scale vpc's. Appreciate the efforts. |
630665f to
1aecb53
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johngmyers The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This should add filtering by VPC for ENIs, which seems needed for scale tests, but also should be a nice addition.
https://kubernetes.slack.com/archives/CCK68P2Q2/p1694457549877619?thread_ts=1694437331.729519&cid=CCK68P2Q2
/cc @rifelpet @justinsb @dims