diff --git a/packages/@aws-cdk/aws-eks/lib/alb-controller.ts b/packages/@aws-cdk/aws-eks/lib/alb-controller.ts index d9ca24c0d1d56..69418e24bfd57 100644 --- a/packages/@aws-cdk/aws-eks/lib/alb-controller.ts +++ b/packages/@aws-cdk/aws-eks/lib/alb-controller.ts @@ -233,8 +233,10 @@ export class AlbController extends CoreConstruct { }, region: Stack.of(this).region, vpcId: props.cluster.vpc.vpcId, - repository: props.repository ?? '602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller', - tag: props.version.version, + image: { + repository: props.repository ?? '602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller', + tag: props.version.version, + }, }, }); @@ -243,5 +245,4 @@ export class AlbController extends CoreConstruct { chart.node.addDependency(props.cluster.openIdConnectProvider); chart.node.addDependency(props.cluster.awsAuth); } - -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-eks/test/alb-controller.test.ts b/packages/@aws-cdk/aws-eks/test/alb-controller.test.ts index 67cf8c245da36..6b5ba464a69a5 100644 --- a/packages/@aws-cdk/aws-eks/test/alb-controller.test.ts +++ b/packages/@aws-cdk/aws-eks/test/alb-controller.test.ts @@ -53,7 +53,7 @@ test('can configure a custom repository', () => { { Ref: 'ClusterDefaultVpcFA9F2722', }, - '","repository":"custom","tag":"v2.3.0"}', + '","image":{"repository":"custom","tag":"v2.3.0"}}', ], ], }, @@ -74,4 +74,4 @@ test('throws when a policy is not defined for a custom version', () => { version: AlbControllerVersion.of('custom'), })).toThrowError("'albControllerOptions.policy' is required when using a custom controller version"); -}); \ No newline at end of file +}); diff --git a/packages/@aws-cdk/aws-eks/test/integ.alb-controller.expected.json b/packages/@aws-cdk/aws-eks/test/integ.alb-controller.expected.json index 217c6e6698bee..3c59987aa297b 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.alb-controller.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.alb-controller.expected.json @@ -1678,7 +1678,7 @@ { "Ref": "Vpc8378EB38" }, - "\",\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.3.0\"}" + "\",\"image\":{\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.3.0\"}}" ] ] }, @@ -2348,4 +2348,4 @@ "Description": "Artifact hash for asset \"06035c90bda92ff37322a329e214af5f2a1e591c6920e0cea4c6816e0f38ac4b\"" } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-inference.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-inference.expected.json index 9bd457a515881..972f83bf64253 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-inference.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-inference.expected.json @@ -2043,7 +2043,7 @@ { "Ref": "Vpc8378EB38" }, - "\",\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.3.0\"}" + "\",\"image\":{\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.3.0\"}}" ] ] }, @@ -2421,4 +2421,4 @@ "Default": "/aws/service/eks/optimized-ami/1.21/amazon-linux-2-gpu/recommended/image_id" } } -} \ No newline at end of file +}