Skip to content

Commit

Permalink
Merge pull request eksctl-io#1194 from weaveworks/instance-type-g3
Browse files Browse the repository at this point in the history
Support gpu instance g3
  • Loading branch information
errordeveloper authored Aug 23, 2019
2 parents bb87748 + 1ba00bc commit 12259ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions pkg/ami/static_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ var _ = Describe("AMI Static Resolution", func() {
ExpectedAMI: "ami-042f9abf2f96a0097",
ExpectError: false,
}),
Entry("with gpu (g3) instance and eu-west-1", ResolveCase{
Region: "eu-west-1",
Version: "1.12",
InstanceType: "g3.4xlarge",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-042f9abf2f96a0097",
ExpectError: false,
}),
Entry("with gpu (p3) instance and non-existent region", ResolveCase{
Region: "eu-east-1",
Version: "1.12",
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
// IsGPUInstanceType returns tru of the instance type is GPU
// optimised.
func IsGPUInstanceType(instanceType string) bool {
return strings.HasPrefix(instanceType, "p2") || strings.HasPrefix(instanceType, "p3")
return strings.HasPrefix(instanceType, "p2") || strings.HasPrefix(instanceType, "p3") || strings.HasPrefix(instanceType, "g3")
}

// HasGPUInstanceType returns true if it finds a gpu instance among the mixed instances
Expand Down

0 comments on commit 12259ee

Please sign in to comment.