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 trn1 limits #2092

Merged
merged 3 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion misc/eni-max-pods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# This file was generated at 2022-08-15T23:21:13Z
# This file was generated at 2022-09-21T13:34:09-07:00
#
# The regions queried were:
# - ap-northeast-1
Expand Down Expand Up @@ -554,6 +554,8 @@ t4g.micro 4
t4g.nano 4
t4g.small 11
t4g.xlarge 58
trn1.2xlarge 58
trn1.32xlarge 247
u-12tb1.112xlarge 737
u-12tb1.metal 147
u-18tb1.metal 737
Expand Down
8 changes: 5 additions & 3 deletions pkg/awsutils/vpc_ip_resource_limit.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 7 additions & 12 deletions scripts/gen_vpc_ip_limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,13 @@ func describeInstanceTypes(region string, eniLimitMap map[string]awsutils.Instan
for _, info := range output.InstanceTypes {
// Ignore any missing values
instanceType := aws.StringValue(info.InstanceType)
eniLimit := int(aws.Int64Value(info.NetworkInfo.MaximumNetworkInterfaces))
// only one network card is supported, so use the MaximumNetworkInterfaces from the default card if more than one are present
var eniLimit int
if len(info.NetworkInfo.NetworkCards) > 1 {
eniLimit = int(aws.Int64Value(info.NetworkInfo.NetworkCards[*info.NetworkInfo.DefaultNetworkCardIndex].MaximumNetworkInterfaces))
} else {
eniLimit = int(aws.Int64Value(info.NetworkInfo.MaximumNetworkInterfaces))
}
ipv4Limit := int(aws.Int64Value(info.NetworkInfo.Ipv4AddressesPerInterface))
hypervisorType := aws.StringValue(info.Hypervisor)
isBareMetalInstance := aws.BoolValue(info.BareMetal)
Expand Down Expand Up @@ -200,18 +206,7 @@ func addManualLimits(limitMap map[string]awsutils.InstanceTypeLimits) map[string
"u-9tb1.metal": {ENILimit: 5, IPv4Limit: 30, HypervisorType: "unknown", IsBareMetal: true},
"c5a.metal": {ENILimit: 15, IPv4Limit: 50, HypervisorType: "unknown", IsBareMetal: true},
"c5ad.metal": {ENILimit: 15, IPv4Limit: 50, HypervisorType: "unknown", IsBareMetal: true},
"p4d.24xlarge": {ENILimit: 15, IPv4Limit: 50, HypervisorType: "unknown", IsBareMetal: false},
"p4de.24xlarge": {ENILimit: 15, IPv4Limit: 50, HypervisorType: "unknown", IsBareMetal: false},
"dl1.24xlarge": {ENILimit: 15, IPv4Limit: 50, HypervisorType: "unknown", IsBareMetal: false},
"c6g.xlarge": {ENILimit: 4, IPv4Limit: 15, HypervisorType: "nitro", IsBareMetal: false},
"c7g.12xlarge": {ENILimit: 8, IPv4Limit: 30, HypervisorType: "nitro", IsBareMetal: false},
"c7g.16xlarge": {ENILimit: 15, IPv4Limit: 50, HypervisorType: "nitro", IsBareMetal: false},
"c7g.2xlarge": {ENILimit: 4, IPv4Limit: 15, HypervisorType: "nitro", IsBareMetal: false},
"c7g.4xlarge": {ENILimit: 8, IPv4Limit: 30, HypervisorType: "nitro", IsBareMetal: false},
"c7g.8xlarge": {ENILimit: 8, IPv4Limit: 30, HypervisorType: "nitro", IsBareMetal: false},
"c7g.large": {ENILimit: 3, IPv4Limit: 10, HypervisorType: "nitro", IsBareMetal: false},
"c7g.medium": {ENILimit: 2, IPv4Limit: 4, HypervisorType: "nitro", IsBareMetal: false},
"c7g.xlarge": {ENILimit: 4, IPv4Limit: 15, HypervisorType: "nitro", IsBareMetal: false},
Copy link
Member Author

@cartermckinnon cartermckinnon Sep 21, 2022

Choose a reason for hiding this comment

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

I removed these based on the scripts output (with the above modifications):

Delete "c6g.xlarge": {4 15 nitro false} is already correct in the API
Delete "c7g.12xlarge": {8 30 nitro false} is already correct in the API
Delete "c7g.16xlarge": {15 50 nitro false} is already correct in the API
Delete "c7g.2xlarge": {4 15 nitro false} is already correct in the API
Delete "c7g.4xlarge": {8 30 nitro false} is already correct in the API
Delete "c7g.8xlarge": {8 30 nitro false} is already correct in the API
Delete "c7g.large": {3 10 nitro false} is already correct in the API
Delete "c7g.medium": {2 4 nitro false} is already correct in the API
Delete "c7g.xlarge": {4 15 nitro false} is already correct in the API
Replacing API value {15 50 nitro false} with override {15 50 unknown false} for "dl1.24xlarge"
Replacing API value {15 50 nitro false} with override {15 50 unknown false} for "p4d.24xlarge"

"c7g.metal": {ENILimit: 15, IPv4Limit: 50, HypervisorType: "unknown", IsBareMetal: true},
}
for instanceType, instanceLimits := range manuallyAddedLimits {
Expand Down