-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Periodically sync ENI limits using EC2 API to update newly launched AWS instance info. #30308
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
Conversation
6e8bf4f
to
d09e947
Compare
This commit refactors the limits package. Instead of passing the ec2Client struct, we define an interface containing the GetInstanceTypes EC2 API method. This allows us to write unit tests for this function using EC2 mock API client. Signed-off-by: Anish Shah <anishshah@google.com>
With this change, we will periodically sync ENI limits using EC2 API. This will help dynamically updating the ENI limits when a new AWS instance is launched without needing to restart cilium. Fixes cilium#28424 Signed-off-by: Anish Shah <anishshah@google.com>
d09e947
to
ae3b9ac
Compare
@christarazi , do you think this change is safe enough to be backported? |
Backports are subject to the backporting criteria. From what I can tell, this PR could be considered for v1.15 backport, but any further seems to be a stretch according to the criteria. |
Thanks, @christarazi. Can you help with triggering the remaining tests? |
/test |
any idea if some tests are flaky? The test failure doesn't seem to be related to my change. How can I retrigger tests? |
I've retriggered the tests as they were flakes. |
Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXX
line if the commit addresses a particularGitHub issue.
Fixes: <commit-id>
tag, thenplease add the commit author[s] as reviewer[s] to this issue.
I'm periodically calling
GetInstanceTypes
EC2 API call to keep updating ENI limits. I think this is overkill (since AWS might be launched only a few new instances per year). But I think it is ok as there are only hundreds of AWS instances and shouldn't impact memory/network perf.Another alternative is to lazy fetch new instance type only when we don't find the instance type. I tried implementing this approach but it required a lot of refactoring.
Fixes: #28424