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

use DescribeNetworkInterfaces with deep filters #399

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

sushrk
Copy link
Contributor

@sushrk sushrk commented Apr 3, 2024

Issue #, if available:
N/A
Description of changes:
Use DescribeNetworkInterfaces EC2 API call with deep filters in v1.5.0 release.
As pagination leads to more EC2 API calls, this can cause EC2 API throttling on the customer account. We will evaluate using pagination in the upcoming releases with some optimizations.

Add integration test case for validating EC2 permissions on the controller

  • verify controller is unable to delete ENIs not provisioned by the controller or vpc-cni (missing eks:eni:owner and other required tags)
  • verify controller is able to create network interface permission on ENIs tagged with eks:eni:owner=eks-vpc-resource-controller
  • verify controller is unable to create network interface permission on ENIs not tagged with eks:eni:owner=eks-vpc-resource-controller
ginkgo -v --timeout 10m -- --cluster-kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$AWS_REGION --aws-vpc-id=$VPC_ID --cluster-role-arn XX

Ran 3 of 3 Specs in 126.137 seconds
SUCCESS! -- 3 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Ginkgo ran 1 suite in 2m8.588011071s
Test Suite Passed

The test cases for validating other EC2 operations are successful is covered in perpodsg test suite.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sushrk sushrk requested a review from a team as a code owner April 3, 2024 00:22
@sushrk sushrk force-pushed the eni-cleanup branch 3 times, most recently from 8527020 to f99196a Compare April 3, 2024 12:27
Copy link
Contributor

@haouc haouc left a comment

Choose a reason for hiding this comment

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

lgtm

@sushrk sushrk merged commit 4992a95 into aws:eni-cleanup Apr 3, 2024
3 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