Skip to content

Commit

Permalink
fixed unit tests and upgraded CDK to 2.173.4
Browse files Browse the repository at this point in the history
  • Loading branch information
shapirov103 committed Dec 30, 2024
1 parent 608c108 commit 7730863
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"ghcr.io/devcontainers/features/aws-cli:1": {},
"ghcr.io/devcontainers-contrib/features/aws-cdk:2": {
"version": "2.173.2"
"version": "2.173.4"
}
},
"postCreateCommand": ".devcontainer/postCreateCommand.sh",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ aws --version
Install CDK matching the current version of the Blueprints QuickStart (which can be found in package.json).

```bash
npm install -g [email protected].2
npm install -g [email protected].4
```

Verify the installation.

```bash
cdk --version
# must output 2.173.2
# must output 2.173.4
```

Create a new CDK project. We use `typescript` for this example.
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ aws --version
Install CDK matching the current version of the Blueprints QuickStart (which can be found in package.json).

```bash
npm install -g [email protected].2
npm install -g [email protected].4
```

Verify the installation.

```bash
cdk --version
# must output 2.173.2
# must output 2.173.4
```

Create a new CDK project. We use `typescript` for this example.
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Create a directory that represents you project (e.g. `my-blueprints`) and then c
```bash
npm install -g n # may require sudo
n stable # may require sudo
npm install -g [email protected].2 # may require sudo (Ubuntu) depending on configuration
cdk --version # must produce 2.173.2
npm install -g [email protected].4 # may require sudo (Ubuntu) depending on configuration
cdk --version # must produce 2.173.4
mkdir my-blueprints
cd my-blueprints
cdk init app --language typescript
Expand Down Expand Up @@ -57,7 +57,7 @@ npm ERR! peer bundled aws-cdk-lib@"2.133.0" from @aws-quickstart/eks-blueprints@
npm ERR! node_modules/@aws-quickstart/eks-blueprint
```

This message means that the version of CDK that the customer is using is different from the version of CDK used in EKS Blueprints. Locate the line `peer bundled` and check the expected version of the CDK. Make sure that in your `package.json` the version is set to the expected. In this example, `package.json` contained `"aws-cdk-lib": "2.133.0"`, while the expected version was `2.173.2`.
This message means that the version of CDK that the customer is using is different from the version of CDK used in EKS Blueprints. Locate the line `peer bundled` and check the expected version of the CDK. Make sure that in your `package.json` the version is set to the expected. In this example, `package.json` contained `"aws-cdk-lib": "2.133.0"`, while the expected version was `2.173.4`.

**Note**: after the initial installation, upgrading the version of CDK to an incompatible higher/lower version will produce a warning, but will succeed. For community support (submitting GitHub issues) please make sure you have a matching version configured.

Expand Down
2 changes: 1 addition & 1 deletion docs/internal/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cd cdk-eks-blueprints
Install CDK (please review and install any missing [pre-requisites](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html) for your environment)

```sh
npm install -g [email protected].2
npm install -g [email protected].4
```

Install the dependencies for this project.
Expand Down
8 changes: 1 addition & 7 deletions lib/addons/aws-loadbalancer-controller/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@ import { ClusterInfo, Values } from "../../spi";
import { registries } from "../../utils/registry-utils";
import { HelmAddOn, HelmAddOnUserProps } from "../helm-addon";
import { AwsLoadbalancerControllerIamPolicy } from "./iam-policy";
<<<<<<< HEAD
import { dependable, supportsALL } from "../../utils";
import { Duration } from "aws-cdk-lib";
import { VpcCniAddOn } from "../vpc-cni";
=======
import { supportsALL } from "../../utils";
import { Duration } from "aws-cdk-lib";
>>>>>>> main


/**
* Configuration options for the add-on.
Expand Down Expand Up @@ -92,7 +87,6 @@ export class AwsLoadBalancerControllerAddOn extends HelmAddOn {
this.options = this.props as AwsLoadBalancerControllerProps;
}

@dependable(VpcCniAddOn.name)
deploy(clusterInfo: ClusterInfo): Promise<Construct> {
const cluster = clusterInfo.cluster;
const serviceAccount = cluster.addServiceAccount(
Expand Down
2 changes: 1 addition & 1 deletion lib/pipelines/code-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ class CodePipeline {
primaryOutputDirectory: `${path}/cdk.out`,
installCommands: [
'n stable',
'npm install -g [email protected].2',
'npm install -g [email protected].4',
`cd $CODEBUILD_SRC_DIR/${path} && npm install`
],
commands: [`cd $CODEBUILD_SRC_DIR/${path}`, 'npm run build', 'npx cdk synth ' + app]
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"semver": "^7.6.0"
},
"peerDependencies": {
"aws-cdk-lib": "2.173.2",
"aws-cdk": "2.173.2"
"aws-cdk-lib": "2.173.4",
"aws-cdk": "2.173.4"
}
}

0 comments on commit 7730863

Please sign in to comment.