Skip to content

Commit

Permalink
feat: bump karpenter to 0.27.2
Browse files Browse the repository at this point in the history
  • Loading branch information
robertd committed Apr 14, 2023
1 parent 754c5f7 commit 7428c41
Show file tree
Hide file tree
Showing 13 changed files with 616 additions and 509 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json

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

6 changes: 2 additions & 4 deletions .github/workflows/build.yml

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

8 changes: 3 additions & 5 deletions .github/workflows/release.yml

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

4 changes: 1 addition & 3 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 .mergify.yml

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

23 changes: 16 additions & 7 deletions .projen/deps.json

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

28 changes: 23 additions & 5 deletions .projen/tasks.json

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

6 changes: 4 additions & 2 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const project = new awscdk.AwsCdkConstructLibrary({
},
compat: true,
stability: 'experimental',
cdkVersion: '2.67.0',
workflowNodeVersion: '^18.14.2',
cdkVersion: '2.74.0',
workflowNodeVersion: '^18.15.0',
autoApproveOptions: {
allowedUsernames: ['cdk-karpenter-automation'],
secret: 'GITHUB_TOKEN',
Expand All @@ -31,12 +31,14 @@ const project = new awscdk.AwsCdkConstructLibrary({
'@aws-cdk/lambda-layer-kubectl-v23',
'@aws-cdk/lambda-layer-kubectl-v24',
'@aws-cdk/lambda-layer-kubectl-v25',
'@aws-cdk/lambda-layer-kubectl-v26',
],
devDeps: [
'aws-cdk-lib',
'@aws-cdk/lambda-layer-kubectl-v23',
'@aws-cdk/lambda-layer-kubectl-v24',
'@aws-cdk/lambda-layer-kubectl-v25',
'@aws-cdk/lambda-layer-kubectl-v26',
],
// deps: [], /* Runtime dependencies of this module. */
// devDeps: [], /* Build dependencies for this module. */
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ More info about Karpenter at: https://karpenter.sh

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

Karpenter version: v0.27.0
Karpenter version: v0.27.2

Notes:
- Karpenter no longer supports Kubernetes v1.20, but now supports Kubernetes v1.25. This change is due to the v1 PDB API, which was introduced in K8s v1.20 and subsequent removal of the v1beta1 API in K8s v1.25.
- Prior to v0.20.0, Karpenter would prioritize certain instance type categories absent of any requirements in the Provisioner. v0.20.0+ removes prioritizing these instance type categories (“m”, “c”, “r”, “a”, “t”, “i”) in code. Bare Metal and GPU instance types are still deprioritized and only used if no other instance types are compatible with the node requirements. This means that, now, you will need to explicitly define the instance types, sizes or categories you want to allow in your Provisioner; otherwise, it is possible that you receive more exotic instance types.
- 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

Upgrade Notes: https://karpenter.sh/v0.27.0/upgrade-guide/#released-upgrade-notes
Upgrade Notes: https://karpenter.sh/v0.27.2/upgrade-guide/#released-upgrade-notes

## Docs

Expand All @@ -26,7 +26,7 @@ Upgrade Notes: https://karpenter.sh/v0.27.0/upgrade-guide/#released-upgrade-note
```ts
import { InstanceClass, InstanceSize, InstanceType, EbsDeviceVolumeType, Vpc } from 'aws-cdk-lib/aws-ec2';
import { Cluster, KubernetesVersion, Nodegroup } from 'aws-cdk-lib/aws-eks';
import { KubectlV24Layer } from '@aws-cdk/lambda-layer-kubectl-v24';
import { KubectlV25Layer } from '@aws-cdk/lambda-layer-kubectl-v25';
import { Karpenter, AMIFamily } from "cdk-karpenter";

...
Expand All @@ -35,7 +35,7 @@ const vpc = new Vpc(stack, 'Vpc', { natGateways: 1 });

const cluster = new Cluster(stack, 'eks', {
vpc,
version: KubernetesVersion.V1_24,
version: KubernetesVersion.V1_25,
kubectlLayer: new KubectlV24Layer(stack, 'kubectl'),
defaultCapacity: 1,
defaultCapacityInstance: InstanceType.of(InstanceClass.T3A, InstanceSize.MEDIUM),
Expand All @@ -49,7 +49,7 @@ 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.27.0/concepts/deprovisioning/
// see: https://karpenter.sh/v0.27.2/concepts/deprovisioning/

// custom provisoner - kitchen sink
karpenter.addProvisioner('custom', {
Expand Down
40 changes: 21 additions & 19 deletions package.json

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

Loading

0 comments on commit 7428c41

Please sign in to comment.