Get network limits using the DescribeInstanceTypes API (to avoid hard coding the instance network setup).
Cache the result 24h (we could probably do more) to avoid an API call for every pod
int -> int64 to match the answer from AWS
Add API mock for test and include test for caching logic
Propagate errors due to network limits
When an instance was unknown, ENILimits used to return {0,0,0} which was a bit confusing in runtime log. The other commit makes an API call to AWS so we can face new errors. This commits propagate errors to ENILimits callers to make them explicit
This PR has 2 commits:
Dynamically get instance network limits
Propagate errors due to network limits When an instance was unknown, ENILimits used to return {0,0,0} which was a bit confusing in runtime log. The other commit makes an API call to AWS so we can face new errors. This commits propagate errors to ENILimits callers to make them explicit