Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws: Filter ENI list by VPC #15903

Merged
merged 1 commit into from Sep 24, 2023
Merged

Conversation

hakman
Copy link
Member

@hakman hakman commented Sep 12, 2023

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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/provider/aws Issues or PRs related to aws provider labels Sep 12, 2023
@hakman hakman force-pushed the aws_list_eni_by_vpc branch 3 times, most recently from 60417d3 to 630665f Compare September 12, 2023 12:21
@@ -79,6 +79,9 @@ func DescribeENIs(cloud fi.Cloud, clusterName string) (map[string]*ec2.NetworkIn
request := &ec2.DescribeNetworkInterfacesInput{
Filters: append(filters, statusFilter),
}
if vpcID != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, here we may as well return. there's no ENI without VPC and it's probably valid for most other things.

@@ -51,7 +51,7 @@ func DescribeRouteTables(cloud fi.Cloud, clusterName string) (map[string]*ec2.Ro
return routeTables, nil
}

func ListRouteTables(cloud fi.Cloud, clusterName string) ([]*resources.Resource, error) {
func ListRouteTables(cloud fi.Cloud, vpcID, clusterName string) ([]*resources.Resource, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hakuna-matatah
Copy link
Contributor

Thanks for adding these changes very quickly, as this will make life easier for us internally on large scale vpc's. Appreciate the efforts.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 14, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 23, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 24, 2023
@k8s-ci-robot
Copy link
Contributor

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2023
@k8s-ci-robot k8s-ci-robot merged commit 97c89f4 into kubernetes:master Sep 24, 2023
22 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Sep 24, 2023
@hakman hakman deleted the aws_list_eni_by_vpc branch September 25, 2023 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants