Skip to content

Commit

Permalink
feat(eks): add nodegroup gpu integ test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKaracaoglu committed Nov 22, 2024
1 parent 7f82fd5 commit f696b9d
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class EksClusterStack extends Stack {

this.assertNodeGroupCustomAmi();

this.assertNodeGroupGpu();

this.assertSimpleManifest();

this.assertManifestWithoutValidation();
Expand Down Expand Up @@ -277,6 +279,19 @@ class EksClusterStack extends Stack {
nodeRole: this.cluster.defaultCapacity ? this.cluster.defaultCapacity.role : undefined,
});
}
private assertNodeGroupGpu() {
// add a GPU nodegroup
this.cluster.addNodegroupCapacity('extra-ng-gpu', {
instanceTypes: [
new ec2.InstanceType('p2.xlarge'),
new ec2.InstanceType('g5.xlarge'),
new ec2.InstanceType('g6e.xlarge'),
],
minSize: 1,
// reusing the default capacity nodegroup instance role when available
nodeRole: this.cluster.defaultCapacity ? this.cluster.defaultCapacity.role : undefined,
});
}
private assertSpotCapacity() {
// spot instances (up to 10)
this.cluster.addAutoScalingGroupCapacity('spot', {
Expand Down

0 comments on commit f696b9d

Please sign in to comment.