Skip to content

Commit

Permalink
Refactor comments and add link to source in volume_limits.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ElijahQuinones committed Aug 15, 2024
1 parent 8725cbb commit 01e9ad7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pkg/cloud/volume_limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,9 @@ var gpuInstanceGpus = map[string]int{
}

// Note this table is not a reflection of how many accelerators an instance has but of how many slots their combined acclerators take up
// VT instance type accelerators take two slots each with the exception of the vt1.24xlarge which takes 0 slots for its acclerators
// VT instance type acclerators take two slots each with the exception of the vt1.24xlarge which takes 0 slots for its acclerators
// inf1 instance types are purposely not added to this table as they are in the maxVolumeLimits table
// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html
var acceleratorSlotsTaken = map[string]int{
"vt1.3xlarge": 2,
"vt1.6xlarge": 4,
Expand Down
8 changes: 4 additions & 4 deletions pkg/driver/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ func TestGetVolumesLimit(t *testing.T) {
},
},
{
// will and should fail if inf1.xlarge instance type is in any table other than maxVolumeLimits table
// Should fail if inf1.xlarge instance type is in any table other than maxVolumeLimits table
name: "inf1.xlarge_volume_attach_limit (Instance has attached Accelerators but should be ignored for EBS volume limits calculation)",
options: &Options{
VolumeAttachLimit: -1,
Expand All @@ -1266,7 +1266,7 @@ func TestGetVolumesLimit(t *testing.T) {
},
},
{
// will and should fail if inf1.xlarge instance type is in any table other than maxVolumeLimits table
// Should fail if inf1.xlarge instance type is in any table other than maxVolumeLimits table
name: "inf1.2xlarge_volume_attach_limit (Instance has attached Accelerators but should be ignored for EBS volume limits calculation)",
options: &Options{
VolumeAttachLimit: -1,
Expand All @@ -1283,7 +1283,7 @@ func TestGetVolumesLimit(t *testing.T) {
},
},
{
// will and should fail if inf1.6xlarge instance type is in any table other than maxVolumeLimits table
// Should fail if inf1.6xlarge instance type is in any table other than maxVolumeLimits table
name: "inf1.6xlarge_volume_attach_limit (Instance has attached Accelerators but should be ignored for EBS volume limits calculation)",
options: &Options{
VolumeAttachLimit: -1,
Expand All @@ -1300,7 +1300,7 @@ func TestGetVolumesLimit(t *testing.T) {
},
},
{
// will and should fail if inf1.24xlarge instance type is in any table other than maxVolumeLimits table
// Should fail if inf1.24xlarge instance type is in any table other than maxVolumeLimits table
name: "inf1.24xlarge_volume_attach_limit (Instance has attached Accelerators but should be ignored for EBS volume limits calculation)",
options: &Options{
VolumeAttachLimit: -1,
Expand Down

0 comments on commit 01e9ad7

Please sign in to comment.