Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
freschri committed Oct 6, 2023
1 parent 8bb221d commit 7d11e7b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/aws-cdk-lib/aws-eks/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1800,10 +1800,16 @@ export class Cluster extends ClusterBase {
* @param options options for creating a new nodegroup
*/
public addNodegroupCapacity(id: string, options?: NodegroupOptions): Nodegroup {
return new Nodegroup(this, `Nodegroup${id}`, {
const mng = new Nodegroup(this, `Nodegroup${id}`, {
cluster: this,
...options,
});

if (options?.instanceTypes?.some(instanceType => nodeTypeForInstanceType(instanceType) === NodeType.INFERENTIA)) {
this.addNeuronDevicePlugin();
}

return mng;
}

/**
Expand Down

0 comments on commit 7d11e7b

Please sign in to comment.