-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgraded to 1.16.3 and latest CDK. Added an ASG with Spot and termina…
…tion handler
- Loading branch information
1 parent
57927c5
commit c059808
Showing
2 changed files
with
35 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import 'source-map-support/register'; | ||
import * as cdk from 'aws-cdk-lib'; | ||
import * as blueprints from '@aws-quickstart/eks-blueprints'; | ||
|
||
import { configureApp } from "../lib/common/construct-utils"; | ||
|
||
const app = configureApp(); | ||
|
||
const spotInterruptHandlerAddOn = new blueprints.addons.AwsNodeTerminationHandlerAddOn({ | ||
version: "0.25.1", | ||
repository: 'oci://public.ecr.aws/aws-ec2/helm/aws-node-termination-handler' | ||
}); | ||
|
||
const clusterProvider = new blueprints.AsgClusterProvider({ | ||
version: cdk.aws_eks.KubernetesVersion.V1_30, | ||
minSize: 1, maxSize: 1, spotPrice: "0.10", | ||
machineImageType: cdk.aws_eks.MachineImageType.BOTTLEROCKET, | ||
id: "asg-spot", | ||
name: "asg-spot", | ||
spotInterruptHandler: false | ||
}); | ||
|
||
const blueprint = blueprints.EksBlueprint.builder() | ||
.region("us-west-2") | ||
.version("auto") | ||
.clusterProvider(clusterProvider) | ||
.addOns(spotInterruptHandlerAddOn) | ||
.build(app, 'asg-test'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters