From e248b9752c921f51844e84e4b3c85b6046d28927 Mon Sep 17 00:00:00 2001 From: guan840912 Date: Thu, 17 Dec 2020 17:39:43 +0000 Subject: [PATCH 1/8] feat(eks): support aws-node-termination-handler image from public ECR --- packages/@aws-cdk/aws-eks/lib/cluster.ts | 5 ++- .../test/integ.eks-cluster.expected.json | 42 +++++++++---------- .../@aws-cdk/aws-eks/test/test.cluster.ts | 3 +- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index d497a854bb8c7..4b457f118e16c 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -1464,11 +1464,14 @@ export class Cluster extends ClusterBase { if (!this._spotInterruptHandler) { this._spotInterruptHandler = this.addHelmChart('spot-interrupt-handler', { chart: 'aws-node-termination-handler', - version: '0.9.5', + version: '0.13.1', repository: 'https://aws.github.io/eks-charts', namespace: 'kube-system', values: { 'nodeSelector.lifecycle': LifecycleLabel.SPOT, + 'image': { + repository: 'public.ecr.aws/r6b0f9a1/aws-node-termination-handler', + }, }, }); } diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json index c6ffd1c00444a..1af57455f53ca 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json @@ -2787,8 +2787,8 @@ }, "Release": "ksclustertestclusterchartspotinterrupthandlerf41ba997", "Chart": "aws-node-termination-handler", - "Version": "0.9.5", - "Values": "{\"nodeSelector.lifecycle\":\"Ec2Spot\"}", + "Version": "0.13.1", + "Values": "{\"nodeSelector.lifecycle\":\"Ec2Spot\",\"image\":{\"repository\":\"public.ecr.aws/r6b0f9a1/aws-node-termination-handler\"}}", "Namespace": "kube-system", "Repository": "https://aws.github.io/eks-charts", "CreateNamespace": true @@ -3867,7 +3867,7 @@ }, "/", { - "Ref": "AssetParameters752d247b8d517e792000798030be8ebb727fc47c48ee1ae0502fd4fe447543a4S3BucketC467D75F" + "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3Bucket93129944" }, "/", { @@ -3877,7 +3877,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters752d247b8d517e792000798030be8ebb727fc47c48ee1ae0502fd4fe447543a4S3VersionKeyFB61265A" + "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1" } ] } @@ -3890,7 +3890,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters752d247b8d517e792000798030be8ebb727fc47c48ee1ae0502fd4fe447543a4S3VersionKeyFB61265A" + "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1" } ] } @@ -3912,11 +3912,11 @@ "Arn" ] }, - "referencetoawscdkeksclustertestAssetParameterse4ce1c625ef8590bc63f26160777b1c74421c8f5290dc5d15227810eedff2e6cS3Bucket13E8DC72Ref": { - "Ref": "AssetParameterse4ce1c625ef8590bc63f26160777b1c74421c8f5290dc5d15227810eedff2e6cS3BucketD473D2B6" + "referencetoawscdkeksclustertestAssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket3AA74A74Ref": { + "Ref": "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket81EA5F11" }, - "referencetoawscdkeksclustertestAssetParameterse4ce1c625ef8590bc63f26160777b1c74421c8f5290dc5d15227810eedff2e6cS3VersionKeyEDAB3239Ref": { - "Ref": "AssetParameterse4ce1c625ef8590bc63f26160777b1c74421c8f5290dc5d15227810eedff2e6cS3VersionKey8213FD47" + "referencetoawscdkeksclustertestAssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3VersionKey2EF124C2Ref": { + "Ref": "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3VersionKey32DED07C" }, "referencetoawscdkeksclustertestVpcPrivateSubnet1Subnet32A4EC2ARef": { "Ref": "VpcPrivateSubnet1Subnet536B997A" @@ -4572,17 +4572,17 @@ "Type": "String", "Description": "Artifact hash for asset \"daeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1\"" }, - "AssetParameterse4ce1c625ef8590bc63f26160777b1c74421c8f5290dc5d15227810eedff2e6cS3BucketD473D2B6": { + "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket81EA5F11": { "Type": "String", - "Description": "S3 bucket for asset \"e4ce1c625ef8590bc63f26160777b1c74421c8f5290dc5d15227810eedff2e6c\"" + "Description": "S3 bucket for asset \"d01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34f\"" }, - "AssetParameterse4ce1c625ef8590bc63f26160777b1c74421c8f5290dc5d15227810eedff2e6cS3VersionKey8213FD47": { + "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3VersionKey32DED07C": { "Type": "String", - "Description": "S3 key for asset version \"e4ce1c625ef8590bc63f26160777b1c74421c8f5290dc5d15227810eedff2e6c\"" + "Description": "S3 key for asset version \"d01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34f\"" }, - "AssetParameterse4ce1c625ef8590bc63f26160777b1c74421c8f5290dc5d15227810eedff2e6cArtifactHashDEE5AB5C": { + "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fArtifactHashE68669BA": { "Type": "String", - "Description": "Artifact hash for asset \"e4ce1c625ef8590bc63f26160777b1c74421c8f5290dc5d15227810eedff2e6c\"" + "Description": "Artifact hash for asset \"d01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34f\"" }, "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket14156880": { "Type": "String", @@ -4632,17 +4632,17 @@ "Type": "String", "Description": "Artifact hash for asset \"a69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0c\"" }, - "AssetParameters752d247b8d517e792000798030be8ebb727fc47c48ee1ae0502fd4fe447543a4S3BucketC467D75F": { + "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3Bucket93129944": { "Type": "String", - "Description": "S3 bucket for asset \"752d247b8d517e792000798030be8ebb727fc47c48ee1ae0502fd4fe447543a4\"" + "Description": "S3 bucket for asset \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" }, - "AssetParameters752d247b8d517e792000798030be8ebb727fc47c48ee1ae0502fd4fe447543a4S3VersionKeyFB61265A": { + "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1": { "Type": "String", - "Description": "S3 key for asset version \"752d247b8d517e792000798030be8ebb727fc47c48ee1ae0502fd4fe447543a4\"" + "Description": "S3 key for asset version \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" }, - "AssetParameters752d247b8d517e792000798030be8ebb727fc47c48ee1ae0502fd4fe447543a4ArtifactHash638D9167": { + "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dArtifactHash17718271": { "Type": "String", - "Description": "Artifact hash for asset \"752d247b8d517e792000798030be8ebb727fc47c48ee1ae0502fd4fe447543a4\"" + "Description": "Artifact hash for asset \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" }, "SsmParameterValueawsserviceeksoptimizedami118amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { "Type": "AWS::SSM::Parameter::Value", diff --git a/packages/@aws-cdk/aws-eks/test/test.cluster.ts b/packages/@aws-cdk/aws-eks/test/test.cluster.ts index 7c23d49a0b2f3..816abe644d4ec 100644 --- a/packages/@aws-cdk/aws-eks/test/test.cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/test.cluster.ts @@ -1241,7 +1241,8 @@ export = { expect(stack).to(haveResource(eks.HelmChart.RESOURCE_TYPE, { Release: 'stackclusterchartspotinterrupthandlerdec62e07', Chart: 'aws-node-termination-handler', - Values: '{\"nodeSelector.lifecycle\":\"Ec2Spot\"}', + Version: '0.13.1', + Values: '{\"nodeSelector.lifecycle\":\"Ec2Spot\",\"image\":{\"repository\":\"public.ecr.aws/r6b0f9a1/aws-node-termination-handler\"}}', Namespace: 'kube-system', Repository: 'https://aws.github.io/eks-charts', })); From 20065b490ca59844b2147cd063cba28aeb017d7f Mon Sep 17 00:00:00 2001 From: Neil Kuan Date: Thu, 24 Dec 2020 10:34:20 +0800 Subject: [PATCH 2/8] fix(eks): update aws-node-termination-handler helm chart version to support pull image from public ECR --- packages/@aws-cdk/aws-eks/lib/cluster.ts | 2 +- .../test/integ.eks-cluster.expected.json | 183 ++++++++++++++++-- .../@aws-cdk/aws-eks/test/test.cluster.ts | 4 +- 3 files changed, 165 insertions(+), 24 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index 4b457f118e16c..b9f02aff389e7 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -1464,7 +1464,7 @@ export class Cluster extends ClusterBase { if (!this._spotInterruptHandler) { this._spotInterruptHandler = this.addHelmChart('spot-interrupt-handler', { chart: 'aws-node-termination-handler', - version: '0.13.1', + version: '0.13.2', repository: 'https://aws.github.io/eks-charts', namespace: 'kube-system', values: { diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json index 1af57455f53ca..d8506744537d5 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json @@ -1251,6 +1251,13 @@ ] }, "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", + { + "Fn::GetAtt": [ + "ClusterNodegroupextrangspotNodeGroupRoleB53B4857", + "Arn" + ] + }, + "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", { "Fn::GetAtt": [ "ClusterNodegroupextrangarmNodeGroupRoleADF5749F", @@ -2787,8 +2794,8 @@ }, "Release": "ksclustertestclusterchartspotinterrupthandlerf41ba997", "Chart": "aws-node-termination-handler", - "Version": "0.13.1", - "Values": "{\"nodeSelector.lifecycle\":\"Ec2Spot\",\"image\":{\"repository\":\"public.ecr.aws/r6b0f9a1/aws-node-termination-handler\"}}", + "Version": "0.13.2", + "Values": "{\"nodeSelector.lifecycle\":\"Ec2Spot\"}", "Namespace": "kube-system", "Repository": "https://aws.github.io/eks-charts", "CreateNamespace": true @@ -3251,6 +3258,109 @@ } } }, + "ClusterNodegroupextrangspotNodeGroupRoleB53B4857": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": { + "Fn::Join": [ + "", + [ + "ec2.", + { + "Ref": "AWS::URLSuffix" + } + ] + ] + } + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/AmazonEKSWorkerNodePolicy" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/AmazonEKS_CNI_Policy" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" + ] + ] + } + ] + } + }, + "ClusterNodegroupextrangspotB327AE6B": { + "Type": "AWS::EKS::Nodegroup", + "Properties": { + "ClusterName": { + "Ref": "Cluster9EE0221C" + }, + "NodeRole": { + "Fn::GetAtt": [ + "ClusterNodegroupextrangspotNodeGroupRoleB53B4857", + "Arn" + ] + }, + "Subnets": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + }, + { + "Ref": "VpcPrivateSubnet3SubnetF258B56E" + } + ], + "AmiType": "AL2_x86_64", + "ForceUpdateEnabled": true, + "InstanceTypes": [ + "c5.large", + "c5a.large", + "c5d.large" + ], + "ScalingConfig": { + "DesiredSize": 3, + "MaxSize": 3, + "MinSize": 3 + }, + "CapacityType": "SPOT" + } + }, "ClusterNodegroupextrangarmNodeGroupRoleADF5749F": { "Type": "AWS::IAM::Role", "Properties": { @@ -3867,7 +3977,7 @@ }, "/", { - "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3Bucket93129944" + "Ref": "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3Bucket133A4850" }, "/", { @@ -3877,7 +3987,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1" + "Ref": "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3VersionKeyC4C77F70" } ] } @@ -3890,7 +4000,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1" + "Ref": "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3VersionKeyC4C77F70" } ] } @@ -3912,11 +4022,11 @@ "Arn" ] }, - "referencetoawscdkeksclustertestAssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket3AA74A74Ref": { - "Ref": "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket81EA5F11" + "referencetoawscdkeksclustertestAssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3Bucket174F3576Ref": { + "Ref": "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3Bucket008DBB35" }, - "referencetoawscdkeksclustertestAssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3VersionKey2EF124C2Ref": { - "Ref": "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3VersionKey32DED07C" + "referencetoawscdkeksclustertestAssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3VersionKeyE8595856Ref": { + "Ref": "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3VersionKey97C3E1A0" }, "referencetoawscdkeksclustertestVpcPrivateSubnet1Subnet32A4EC2ARef": { "Ref": "VpcPrivateSubnet1Subnet536B997A" @@ -3933,6 +4043,9 @@ "ClusterSecurityGroupId" ] }, + "referencetoawscdkeksclustertestVpc9A302ADDRef": { + "Ref": "Vpc8378EB38" + }, "referencetoawscdkeksclustertestAssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3Bucket0815E7B5Ref": { "Ref": "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3BucketDC4B98B1" }, @@ -3966,6 +4079,34 @@ } } }, + "HelloAppWithoutValidation7C638ACB": { + "Type": "Custom::AWSCDK-EKS-KubernetesResource", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", + "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" + ] + }, + "Manifest": "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"data\":{\"hello\":\"world\"},\"metadata\":{\"name\":\"config-map\",\"labels\":{\"aws.cdk.eks/prune-c89cbcc5d9bdd35cfc69c0334c0a9af21d1e0e372e\":\"\"}},\"unknown\":{\"key\":\"value\"}}]", + "ClusterName": { + "Ref": "Cluster9EE0221C" + }, + "RoleArn": { + "Fn::GetAtt": [ + "ClusterCreationRole360249B6", + "Arn" + ] + }, + "PruneLabel": "aws.cdk.eks/prune-c89cbcc5d9bdd35cfc69c0334c0a9af21d1e0e372e", + "SkipValidation": true + }, + "DependsOn": [ + "ClusterKubectlReadyBarrier200052AF" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { "Type": "AWS::IAM::Role", "Properties": { @@ -4572,17 +4713,17 @@ "Type": "String", "Description": "Artifact hash for asset \"daeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1\"" }, - "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket81EA5F11": { + "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3Bucket008DBB35": { "Type": "String", - "Description": "S3 bucket for asset \"d01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34f\"" + "Description": "S3 bucket for asset \"bafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757\"" }, - "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3VersionKey32DED07C": { + "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3VersionKey97C3E1A0": { "Type": "String", - "Description": "S3 key for asset version \"d01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34f\"" + "Description": "S3 key for asset version \"bafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757\"" }, - "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fArtifactHashE68669BA": { + "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757ArtifactHashF584A7D8": { "Type": "String", - "Description": "Artifact hash for asset \"d01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34f\"" + "Description": "Artifact hash for asset \"bafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757\"" }, "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket14156880": { "Type": "String", @@ -4632,17 +4773,17 @@ "Type": "String", "Description": "Artifact hash for asset \"a69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0c\"" }, - "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3Bucket93129944": { + "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3Bucket133A4850": { "Type": "String", - "Description": "S3 bucket for asset \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" + "Description": "S3 bucket for asset \"c73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09d\"" }, - "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1": { + "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3VersionKeyC4C77F70": { "Type": "String", - "Description": "S3 key for asset version \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" + "Description": "S3 key for asset version \"c73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09d\"" }, - "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dArtifactHash17718271": { + "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dArtifactHash7484ACD9": { "Type": "String", - "Description": "Artifact hash for asset \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" + "Description": "Artifact hash for asset \"c73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09d\"" }, "SsmParameterValueawsserviceeksoptimizedami118amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { "Type": "AWS::SSM::Parameter::Value", diff --git a/packages/@aws-cdk/aws-eks/test/test.cluster.ts b/packages/@aws-cdk/aws-eks/test/test.cluster.ts index 816abe644d4ec..f5eb9338efc20 100644 --- a/packages/@aws-cdk/aws-eks/test/test.cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/test.cluster.ts @@ -1241,8 +1241,8 @@ export = { expect(stack).to(haveResource(eks.HelmChart.RESOURCE_TYPE, { Release: 'stackclusterchartspotinterrupthandlerdec62e07', Chart: 'aws-node-termination-handler', - Version: '0.13.1', - Values: '{\"nodeSelector.lifecycle\":\"Ec2Spot\",\"image\":{\"repository\":\"public.ecr.aws/r6b0f9a1/aws-node-termination-handler\"}}', + Version: '0.13.2', + Values: '{\"nodeSelector.lifecycle\":\"Ec2Spot\"}', Namespace: 'kube-system', Repository: 'https://aws.github.io/eks-charts', })); From 32114a46ce71cd964271f173bd2b7ce401d37433 Mon Sep 17 00:00:00 2001 From: Neil Kuan Date: Thu, 24 Dec 2020 10:38:22 +0800 Subject: [PATCH 3/8] fix(eks): update aws-node-termination-handler helm chart version to support pull image from public ECR --- packages/@aws-cdk/aws-eks/lib/cluster.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index b9f02aff389e7..d77014e90e0e0 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -1469,9 +1469,6 @@ export class Cluster extends ClusterBase { namespace: 'kube-system', values: { 'nodeSelector.lifecycle': LifecycleLabel.SPOT, - 'image': { - repository: 'public.ecr.aws/r6b0f9a1/aws-node-termination-handler', - }, }, }); } From 7ef47f61a3e1f2241c688041770ee317339e5625 Mon Sep 17 00:00:00 2001 From: guan840912 Date: Thu, 24 Dec 2020 06:04:49 +0000 Subject: [PATCH 4/8] fix(eks): support aws-node-termination-handler image from public ECR --- .../test/integ.eks-cluster.expected.json | 179 ++---------------- .../@aws-cdk/aws-eks/test/test.cluster.ts | 1 - 2 files changed, 19 insertions(+), 161 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json index d8506744537d5..e82d54ce5a7c5 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json @@ -1251,13 +1251,6 @@ ] }, "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupextrangspotNodeGroupRoleB53B4857", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", { "Fn::GetAtt": [ "ClusterNodegroupextrangarmNodeGroupRoleADF5749F", @@ -3258,109 +3251,6 @@ } } }, - "ClusterNodegroupextrangspotNodeGroupRoleB53B4857": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "ClusterNodegroupextrangspotB327AE6B": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupextrangspotNodeGroupRoleB53B4857", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "c5.large", - "c5a.large", - "c5d.large" - ], - "ScalingConfig": { - "DesiredSize": 3, - "MaxSize": 3, - "MinSize": 3 - }, - "CapacityType": "SPOT" - } - }, "ClusterNodegroupextrangarmNodeGroupRoleADF5749F": { "Type": "AWS::IAM::Role", "Properties": { @@ -3977,7 +3867,7 @@ }, "/", { - "Ref": "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3Bucket133A4850" + "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3Bucket93129944" }, "/", { @@ -3987,7 +3877,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3VersionKeyC4C77F70" + "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1" } ] } @@ -4000,7 +3890,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3VersionKeyC4C77F70" + "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1" } ] } @@ -4022,11 +3912,11 @@ "Arn" ] }, - "referencetoawscdkeksclustertestAssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3Bucket174F3576Ref": { - "Ref": "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3Bucket008DBB35" + "referencetoawscdkeksclustertestAssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket3AA74A74Ref": { + "Ref": "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket81EA5F11" }, - "referencetoawscdkeksclustertestAssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3VersionKeyE8595856Ref": { - "Ref": "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3VersionKey97C3E1A0" + "referencetoawscdkeksclustertestAssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3VersionKey2EF124C2Ref": { + "Ref": "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3VersionKey32DED07C" }, "referencetoawscdkeksclustertestVpcPrivateSubnet1Subnet32A4EC2ARef": { "Ref": "VpcPrivateSubnet1Subnet536B997A" @@ -4043,9 +3933,6 @@ "ClusterSecurityGroupId" ] }, - "referencetoawscdkeksclustertestVpc9A302ADDRef": { - "Ref": "Vpc8378EB38" - }, "referencetoawscdkeksclustertestAssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3Bucket0815E7B5Ref": { "Ref": "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3BucketDC4B98B1" }, @@ -4079,34 +3966,6 @@ } } }, - "HelloAppWithoutValidation7C638ACB": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "Manifest": "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"data\":{\"hello\":\"world\"},\"metadata\":{\"name\":\"config-map\",\"labels\":{\"aws.cdk.eks/prune-c89cbcc5d9bdd35cfc69c0334c0a9af21d1e0e372e\":\"\"}},\"unknown\":{\"key\":\"value\"}}]", - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c89cbcc5d9bdd35cfc69c0334c0a9af21d1e0e372e", - "SkipValidation": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { "Type": "AWS::IAM::Role", "Properties": { @@ -4713,17 +4572,17 @@ "Type": "String", "Description": "Artifact hash for asset \"daeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1\"" }, - "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3Bucket008DBB35": { + "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket81EA5F11": { "Type": "String", - "Description": "S3 bucket for asset \"bafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757\"" + "Description": "S3 bucket for asset \"d01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34f\"" }, - "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3VersionKey97C3E1A0": { + "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3VersionKey32DED07C": { "Type": "String", - "Description": "S3 key for asset version \"bafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757\"" + "Description": "S3 key for asset version \"d01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34f\"" }, - "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757ArtifactHashF584A7D8": { + "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fArtifactHashE68669BA": { "Type": "String", - "Description": "Artifact hash for asset \"bafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757\"" + "Description": "Artifact hash for asset \"d01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34f\"" }, "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket14156880": { "Type": "String", @@ -4773,17 +4632,17 @@ "Type": "String", "Description": "Artifact hash for asset \"a69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0c\"" }, - "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3Bucket133A4850": { + "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3Bucket93129944": { "Type": "String", - "Description": "S3 bucket for asset \"c73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09d\"" + "Description": "S3 bucket for asset \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" }, - "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3VersionKeyC4C77F70": { + "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1": { "Type": "String", - "Description": "S3 key for asset version \"c73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09d\"" + "Description": "S3 key for asset version \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" }, - "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dArtifactHash7484ACD9": { + "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dArtifactHash17718271": { "Type": "String", - "Description": "Artifact hash for asset \"c73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09d\"" + "Description": "Artifact hash for asset \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" }, "SsmParameterValueawsserviceeksoptimizedami118amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { "Type": "AWS::SSM::Parameter::Value", diff --git a/packages/@aws-cdk/aws-eks/test/test.cluster.ts b/packages/@aws-cdk/aws-eks/test/test.cluster.ts index f5eb9338efc20..7c23d49a0b2f3 100644 --- a/packages/@aws-cdk/aws-eks/test/test.cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/test.cluster.ts @@ -1241,7 +1241,6 @@ export = { expect(stack).to(haveResource(eks.HelmChart.RESOURCE_TYPE, { Release: 'stackclusterchartspotinterrupthandlerdec62e07', Chart: 'aws-node-termination-handler', - Version: '0.13.2', Values: '{\"nodeSelector.lifecycle\":\"Ec2Spot\"}', Namespace: 'kube-system', Repository: 'https://aws.github.io/eks-charts', From d8b91719a754dfef0918191e1bed75fb56bc4840 Mon Sep 17 00:00:00 2001 From: guan840912 Date: Thu, 24 Dec 2020 07:01:51 +0000 Subject: [PATCH 5/8] minor --- .../test/integ.eks-cluster.expected.json | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json index 5d93127cb282e..66b8b1d9ea328 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json @@ -3977,11 +3977,7 @@ }, "/", { -<<<<<<< HEAD "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3Bucket93129944" -======= - "Ref": "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3Bucket133A4850" ->>>>>>> upstream/master }, "/", { @@ -3991,11 +3987,7 @@ "Fn::Split": [ "||", { -<<<<<<< HEAD "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1" -======= - "Ref": "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3VersionKeyC4C77F70" ->>>>>>> upstream/master } ] } @@ -4008,11 +4000,7 @@ "Fn::Split": [ "||", { -<<<<<<< HEAD "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1" -======= - "Ref": "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3VersionKeyC4C77F70" ->>>>>>> upstream/master } ] } @@ -4034,19 +4022,11 @@ "Arn" ] }, -<<<<<<< HEAD "referencetoawscdkeksclustertestAssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket3AA74A74Ref": { "Ref": "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket81EA5F11" }, "referencetoawscdkeksclustertestAssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3VersionKey2EF124C2Ref": { "Ref": "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3VersionKey32DED07C" -======= - "referencetoawscdkeksclustertestAssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3Bucket174F3576Ref": { - "Ref": "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3Bucket008DBB35" - }, - "referencetoawscdkeksclustertestAssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3VersionKeyE8595856Ref": { - "Ref": "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3VersionKey97C3E1A0" ->>>>>>> upstream/master }, "referencetoawscdkeksclustertestVpcPrivateSubnet1Subnet32A4EC2ARef": { "Ref": "VpcPrivateSubnet1Subnet536B997A" @@ -4733,7 +4713,6 @@ "Type": "String", "Description": "Artifact hash for asset \"daeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1\"" }, -<<<<<<< HEAD "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fS3Bucket81EA5F11": { "Type": "String", "Description": "S3 bucket for asset \"d01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34f\"" @@ -4745,19 +4724,6 @@ "AssetParametersd01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34fArtifactHashE68669BA": { "Type": "String", "Description": "Artifact hash for asset \"d01b2d8959358117de0017e6f18135905e5680cfc8a83e406229c02671c2b34f\"" -======= - "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3Bucket008DBB35": { - "Type": "String", - "Description": "S3 bucket for asset \"bafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757\"" - }, - "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757S3VersionKey97C3E1A0": { - "Type": "String", - "Description": "S3 key for asset version \"bafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757\"" - }, - "AssetParametersbafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757ArtifactHashF584A7D8": { - "Type": "String", - "Description": "Artifact hash for asset \"bafd50ae9f214e496ff8c72c6425f93dca3ccd590e20963706d5d610d9c75757\"" ->>>>>>> upstream/master }, "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket14156880": { "Type": "String", @@ -4807,7 +4773,6 @@ "Type": "String", "Description": "Artifact hash for asset \"a69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0c\"" }, -<<<<<<< HEAD "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3Bucket93129944": { "Type": "String", "Description": "S3 bucket for asset \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" @@ -4819,19 +4784,6 @@ "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dArtifactHash17718271": { "Type": "String", "Description": "Artifact hash for asset \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" -======= - "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3Bucket133A4850": { - "Type": "String", - "Description": "S3 bucket for asset \"c73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09d\"" - }, - "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dS3VersionKeyC4C77F70": { - "Type": "String", - "Description": "S3 key for asset version \"c73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09d\"" - }, - "AssetParametersc73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09dArtifactHash7484ACD9": { - "Type": "String", - "Description": "Artifact hash for asset \"c73abc34737d53a79bc2f339e8ae561af314b1fc67c51905129dcec3771ba09d\"" ->>>>>>> upstream/master }, "SsmParameterValueawsserviceeksoptimizedami118amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { "Type": "AWS::SSM::Parameter::Value", From 405ec3017d7906f74adc7c01f4b454cb8213e399 Mon Sep 17 00:00:00 2001 From: guan840912 Date: Fri, 25 Dec 2020 01:21:46 +0000 Subject: [PATCH 6/8] minor --- .../test/integ.eks-cluster.expected.json | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json index 8f242fba8f83b..f62d6a1fa0d9a 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json @@ -3977,11 +3977,7 @@ }, "/", { -<<<<<<< HEAD - "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3Bucket93129944" -======= "Ref": "AssetParameters5b4a9f125b1d010c96760d55e0fc56362a73e6ca6da3af20a4d13ea27e369853S3Bucket3EB15EF2" ->>>>>>> upstream/master }, "/", { @@ -3991,11 +3987,7 @@ "Fn::Split": [ "||", { -<<<<<<< HEAD - "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1" -======= "Ref": "AssetParameters5b4a9f125b1d010c96760d55e0fc56362a73e6ca6da3af20a4d13ea27e369853S3VersionKeyD6A244FC" ->>>>>>> upstream/master } ] } @@ -4008,11 +4000,7 @@ "Fn::Split": [ "||", { -<<<<<<< HEAD - "Ref": "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1" -======= "Ref": "AssetParameters5b4a9f125b1d010c96760d55e0fc56362a73e6ca6da3af20a4d13ea27e369853S3VersionKeyD6A244FC" ->>>>>>> upstream/master } ] } @@ -4821,19 +4809,6 @@ "Type": "String", "Description": "Artifact hash for asset \"a69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0c\"" }, -<<<<<<< HEAD - "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3Bucket93129944": { - "Type": "String", - "Description": "S3 bucket for asset \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" - }, - "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dS3VersionKey7845F6C1": { - "Type": "String", - "Description": "S3 key for asset version \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" - }, - "AssetParameters65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5dArtifactHash17718271": { - "Type": "String", - "Description": "Artifact hash for asset \"65be2ef43ca40d05e33189be5a34aa2f1ada48bbda42d21ca94ad3dae195ed5d\"" -======= "AssetParameters5b4a9f125b1d010c96760d55e0fc56362a73e6ca6da3af20a4d13ea27e369853S3Bucket3EB15EF2": { "Type": "String", "Description": "S3 bucket for asset \"5b4a9f125b1d010c96760d55e0fc56362a73e6ca6da3af20a4d13ea27e369853\"" @@ -4845,7 +4820,6 @@ "AssetParameters5b4a9f125b1d010c96760d55e0fc56362a73e6ca6da3af20a4d13ea27e369853ArtifactHashD763BE57": { "Type": "String", "Description": "Artifact hash for asset \"5b4a9f125b1d010c96760d55e0fc56362a73e6ca6da3af20a4d13ea27e369853\"" ->>>>>>> upstream/master }, "SsmParameterValueawsserviceeksoptimizedami118amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { "Type": "AWS::SSM::Parameter::Value", From 42663a0bf5fcae993863d52446501820ce4a2773 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Fri, 25 Dec 2020 14:08:10 +0200 Subject: [PATCH 7/8] Dummy to trigger build --- packages/@aws-cdk/aws-eks/lib/cluster.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index 6b69c9299d076..28cb8bfe5a6d3 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -1440,7 +1440,7 @@ export class Cluster extends ClusterBase { if (!this._spotInterruptHandler) { this._spotInterruptHandler = this.addHelmChart('spot-interrupt-handler', { chart: 'aws-node-termination-handler', - version: '0.13.2', + version: '0.13.2', repository: 'https://aws.github.io/eks-charts', namespace: 'kube-system', values: { @@ -1920,4 +1920,3 @@ function cpuArchForInstanceType(instanceType: ec2.InstanceType) { INSTANCE_TYPES.graviton.includes(instanceType.toString().substring(0, 2)) ? CpuArch.ARM_64 : CpuArch.X86_64; } - From 89cd097dddbc15ff6f98cbc7e485b64a81eda884 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Fri, 25 Dec 2020 14:45:11 +0200 Subject: [PATCH 8/8] Make linter happy --- packages/@aws-cdk/aws-eks/lib/cluster.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index 28cb8bfe5a6d3..07ed5aa60ce32 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -1440,7 +1440,7 @@ export class Cluster extends ClusterBase { if (!this._spotInterruptHandler) { this._spotInterruptHandler = this.addHelmChart('spot-interrupt-handler', { chart: 'aws-node-termination-handler', - version: '0.13.2', + version: '0.13.2', repository: 'https://aws.github.io/eks-charts', namespace: 'kube-system', values: {