Skip to content

Commit f696b9d

Browse files
feat(eks): add nodegroup gpu integ test
1 parent 7f82fd5 commit f696b9d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ class EksClusterStack extends Stack {
7575

7676
this.assertNodeGroupCustomAmi();
7777

78+
this.assertNodeGroupGpu();
79+
7880
this.assertSimpleManifest();
7981

8082
this.assertManifestWithoutValidation();
@@ -277,6 +279,19 @@ class EksClusterStack extends Stack {
277279
nodeRole: this.cluster.defaultCapacity ? this.cluster.defaultCapacity.role : undefined,
278280
});
279281
}
282+
private assertNodeGroupGpu() {
283+
// add a GPU nodegroup
284+
this.cluster.addNodegroupCapacity('extra-ng-gpu', {
285+
instanceTypes: [
286+
new ec2.InstanceType('p2.xlarge'),
287+
new ec2.InstanceType('g5.xlarge'),
288+
new ec2.InstanceType('g6e.xlarge'),
289+
],
290+
minSize: 1,
291+
// reusing the default capacity nodegroup instance role when available
292+
nodeRole: this.cluster.defaultCapacity ? this.cluster.defaultCapacity.role : undefined,
293+
});
294+
}
280295
private assertSpotCapacity() {
281296
// spot instances (up to 10)
282297
this.cluster.addAutoScalingGroupCapacity('spot', {

0 commit comments

Comments
 (0)