Skip to content

Commit

Permalink
Upgrade CDK to 1.81+
Browse files Browse the repository at this point in the history
  • Loading branch information
clareliguori committed Jan 6, 2021
1 parent ecc7a82 commit 6cef496
Show file tree
Hide file tree
Showing 14 changed files with 1,993 additions and 1,536 deletions.
1,064 changes: 572 additions & 492 deletions pipelines/package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions pipelines/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"aws-cdk": "^1.81.0"
},
"dependencies": {
"@aws-cdk/aws-codebuild": "^1.56.0",
"@aws-cdk/aws-codecommit": "^1.56.0",
"@aws-cdk/aws-codepipeline": "^1.56.0",
"@aws-cdk/aws-codepipeline-actions": "^1.56.0",
"@aws-cdk/aws-codestarnotifications": "^1.56.0",
"@aws-cdk/aws-ecr": "^1.56.0",
"@aws-cdk/aws-iam": "^1.56.0",
"@aws-cdk/core": "^1.56.0"
"@aws-cdk/aws-codebuild": "^1.81.0",
"@aws-cdk/aws-codecommit": "^1.81.0",
"@aws-cdk/aws-codepipeline": "^1.81.0",
"@aws-cdk/aws-codepipeline-actions": "^1.81.0",
"@aws-cdk/aws-codestarnotifications": "^1.81.0",
"@aws-cdk/aws-ecr": "^1.81.0",
"@aws-cdk/aws-iam": "^1.81.0",
"@aws-cdk/core": "^1.81.0"
}
}
2 changes: 1 addition & 1 deletion pipelines/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"lib": ["es2016", "es2017.object", "es2017.string"],
"declaration": true,
"strict": true,
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
Expand Down
677 changes: 411 additions & 266 deletions static-site/cdk/package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions static-site/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"typescript": "^4.1.3"
},
"dependencies": {
"@aws-cdk/aws-certificatemanager": "^1.56.0",
"@aws-cdk/aws-cloudfront": "^1.56.0",
"@aws-cdk/aws-route53": "^1.56.0",
"@aws-cdk/aws-route53-targets": "^1.56.0",
"@aws-cdk/aws-s3": "^1.56.0",
"@aws-cdk/aws-s3-deployment": "^1.56.0",
"@aws-cdk/core": "^1.56.0"
"@aws-cdk/aws-certificatemanager": "^1.81.0",
"@aws-cdk/aws-cloudfront": "^1.81.0",
"@aws-cdk/aws-route53": "^1.81.0",
"@aws-cdk/aws-route53-targets": "^1.81.0",
"@aws-cdk/aws-s3": "^1.81.0",
"@aws-cdk/aws-s3-deployment": "^1.81.0",
"@aws-cdk/core": "^1.81.0"
}
}
3 changes: 1 addition & 2 deletions static-site/cdk/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"lib": ["es2016", "es2017.object", "es2017.string"],
"declaration": true,
"strict": true,
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
Expand All @@ -19,4 +19,3 @@
"strictPropertyInitialization":false
}
}

10 changes: 5 additions & 5 deletions trivia-backend/infra/cdk/eks-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as cdk from '@aws-cdk/core';
import {Certificate} from '@aws-cdk/aws-certificatemanager';
import {Vpc} from '@aws-cdk/aws-ec2';
import {Repository} from '@aws-cdk/aws-ecr';
import {FargateCluster, KubernetesResource, KubernetesVersion} from '@aws-cdk/aws-eks';
import {FargateCluster, KubernetesManifest, KubernetesVersion} from '@aws-cdk/aws-eks';
import {ContainerImage} from '@aws-cdk/aws-ecs';
import {AccountRootPrincipal, Effect, FederatedPrincipal, ManagedPolicy, PolicyStatement, Role} from '@aws-cdk/aws-iam';
import {StringParameter} from '@aws-cdk/aws-ssm';
Expand Down Expand Up @@ -64,7 +64,7 @@ class TriviaBackendStack extends cdk.Stack {
});
reinventTrivia.node.addDependency(fargateProfile);

const metricsServerChart = cluster.addChart('MetricsServer', {
const metricsServerChart = cluster.addHelmChart('MetricsServer', {
chart: 'metrics-server',
release: 'metrics-server-rt',
repository: 'https://kubernetes-charts.storage.googleapis.com',
Expand Down Expand Up @@ -102,7 +102,7 @@ class TriviaBackendStack extends cdk.Stack {
]
});

const albIngressChart = cluster.addChart('AlbIngress', {
const albIngressChart = cluster.addHelmChart('AlbIngress', {
chart: 'aws-alb-ingress-controller',
release: 'alb-ingress-controller-rt',
repository: 'https://kubernetes-charts-incubator.storage.googleapis.com',
Expand All @@ -126,7 +126,7 @@ class TriviaBackendStack extends cdk.Stack {
});
albIngressChart.node.addDependency(metricsServerChart);

new KubernetesResource(this, 'HorizontalPodAutoscaler', {
new KubernetesManifest(this, 'HorizontalPodAutoscaler', {
cluster,
manifest: [{
apiVersion: 'autoscaling/v1',
Expand Down Expand Up @@ -184,7 +184,7 @@ class TriviaBackendStack extends cdk.Stack {
})
]
});
const externalDnsChart = cluster.addChart('ExternalDns', {
const externalDnsChart = cluster.addHelmChart('ExternalDns', {
chart: 'external-dns',
release: 'external-dns-rt',
repository: 'https://kubernetes-charts.storage.googleapis.com',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Construct} from '@aws-cdk/core';
import {Cluster, KubernetesResource} from '@aws-cdk/aws-eks';
import {Cluster, KubernetesManifest} from '@aws-cdk/aws-eks';
import {ICertificate} from '@aws-cdk/aws-certificatemanager';
import {EcrImage} from '@aws-cdk/aws-ecs';
/**
Expand All @@ -26,7 +26,7 @@ export interface ReinventTriviaResourceProps {
readonly image: EcrImage;
}

export class ReinventTriviaResource extends KubernetesResource {
export class ReinventTriviaResource extends KubernetesManifest {
constructor(parent: Construct, id: string, props: ReinventTriviaResourceProps) {
const manifest = [
{
Expand Down
Loading

0 comments on commit 6cef496

Please sign in to comment.