Skip to content

Commit

Permalink
feat: bump karpenter to 0.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
robertd committed Sep 12, 2022
1 parent b2a3c5f commit 92c4676
Show file tree
Hide file tree
Showing 17 changed files with 1,609 additions and 1,221 deletions.
1 change: 1 addition & 0 deletions .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/auto-approve.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/pull-request-lint.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions .github/workflows/release.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions .github/workflows/upgrade-main.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ const project = new awscdk.AwsCdkConstructLibrary({
compat: true,
stability: 'experimental',
cdkVersion: '2.4.0',
workflowNodeVersion: '^16.14.2',
workflowNodeVersion: '^16.17.0',
autoApproveOptions: {
allowedUsernames: ['cdk-karpenter-automation'],
secret: 'GITHUB_TOKEN',
},
majorVersion: 1,
majorVersion: 2,
autoApproveProjenUpgrades: true,
projenTokenSecret: 'PROJEN_GITHUB_TOKEN',
autoApproveUpgrades: true,
Expand All @@ -48,6 +48,7 @@ const common_exclude = [
'src/integ.karpenter-fargate-ephemeral.ts',
'src/integ.karpenter-fargate.ts',
'src/integ.karpenter.ts',
'src/permissions-boundary.ts',
];
project.gitignore.exclude(...common_exclude);

Expand Down
59 changes: 56 additions & 3 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ More info about Karpenter at: https://karpenter.sh

Karpenter Best Practices: https://aws.github.io/aws-eks-best-practices/karpenter/

Karpenter version: 0.16.1

Note: As of v0.16.0 changed the default replicas from 1 to 2. See: https://github.com/aws/karpenter/blob/main/website/content/en/v0.16.1/troubleshooting.md

## Showcase

```ts
Expand All @@ -33,8 +37,10 @@ const karpenter = new Karpenter(stack, 'karpenter', {

// default provisioner
karpenter.addProvisioner('default');
//Note: Default provisioner has no cpu/mem limits, nor will cleanup provisioned resources. Use with caution.
// see: https://karpenter.sh/v0.16.1/provisioner/#node-deprovisioning

// customized provisoner
// custom provisoner - kitchen sink
karpenter.addProvisioner('custom', {
requirements: {
archTypes: [ArchType.AMD64, ArchType.ARM64],
Expand All @@ -47,7 +53,7 @@ karpenter.addProvisioner('custom', {
InstanceType.of(InstanceClass.G5, InstanceSize.LARGE),
],
},
ttlSecondsAfterEmpty: Duration.hours(2),
ttlSecondsAfterEmpty: Duration.hours(1),
ttlSecondsUntilExpired: Duration.days(90),
labels: {
billing: 'my-team',
Expand All @@ -68,11 +74,16 @@ karpenter.addProvisioner('custom', {
cpu: '1',
mem: '1000Gi',
},
consolidation: false,
provider: {
amiFamily: AMIFamily.AL2,
amiSelector: {
'aws-ids': 'ami-123,ami-456',
},
tags: {
Foo: 'Bar',
},
launchTemplate: 'MyLaunchTemplate',
blockDeviceMappings: [
{
deviceName: 'test',
Expand Down
Loading

0 comments on commit 92c4676

Please sign in to comment.