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

Add vpc-id to leaked eni filters #2856

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Conversation

jchen6585
Copy link
Contributor

@jchen6585 jchen6585 commented Mar 20, 2024

What type of PR is this?

improvement

Which issue does this PR fix?:

N/A

What does this PR do / Why do we need it?:
Adds a VPC-ID filter when checking for leaked ENIs for better filtering.

Testing done on this change:

Verified that (for testing purposes changed the loop to check every minute rather than hour during testing: https://github.com/aws/amazon-vpc-cni-k8s/blob/master/pkg/awsutils/awsutils.go#L390)

  • CNI tagged ENIs are cleaned up properly after manually adding them through EC2 console.
    • Tagged with node.k8s.amazonaws.com/createdAt: <time_stamp>
    • Tagged with node.k8s.amazonaws.com/instance_id: <instance_id>
    • Tagged with cluster.k8s.amazonaws.com/name: <cluster_name>
    • Description starts with aws-K8S-
  • Untagged ENIs are not cleaned up.
  • CNI tagged ENIs on a different VPC are not cleaned up.
  • Verified VPC ID is populated in the DescribeNetworkInterface call
    • Request:{method:DescribeUserInterfaces, request-id:<request-id>, request:{\"InterfaceIds\":null, \"SubnetIds\":null, \"SecurityGroupIds\":null, \"PrivateAddresses\":null, \"InstanceIds\":null, \"PrivateDnsNames\":null, \"InstancePrivateDnsNames\":null, \"MacAddresses\":null, \"VpcId\":\"<vpc-id>\", [...]

Will this PR introduce any new dependencies?:

N/A

Will this break upgrades or downgrades? Has updating a running cluster been tested?:
N/A

Does this change require updates to the CNI daemonset config files to work?:

N/A

Does this PR introduce any user-facing change?:

N/A


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jchen6585 jchen6585 requested a review from a team as a code owner March 20, 2024 19:00
@jchen6585 jchen6585 marked this pull request as draft March 20, 2024 19:00
@jchen6585 jchen6585 marked this pull request as ready for review March 21, 2024 17:44
Copy link
Contributor

@jayanthvn jayanthvn left a comment

Choose a reason for hiding this comment

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

lgtm

@jchen6585 jchen6585 merged commit 87115cf into aws:master Mar 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants