Skip to content

Commit e4256c8

Browse files
authored
fix(eks): cannot customize alb controller repository and version (#18081)
Close #18054 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent bdd91cb commit e4256c8

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

packages/@aws-cdk/aws-eks/lib/alb-controller.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,10 @@ export class AlbController extends CoreConstruct {
233233
},
234234
region: Stack.of(this).region,
235235
vpcId: props.cluster.vpc.vpcId,
236-
repository: props.repository ?? '602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller',
237-
tag: props.version.version,
236+
image: {
237+
repository: props.repository ?? '602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller',
238+
tag: props.version.version,
239+
},
238240
},
239241
});
240242

@@ -243,5 +245,4 @@ export class AlbController extends CoreConstruct {
243245
chart.node.addDependency(props.cluster.openIdConnectProvider);
244246
chart.node.addDependency(props.cluster.awsAuth);
245247
}
246-
247-
}
248+
}

packages/@aws-cdk/aws-eks/test/alb-controller.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ test('can configure a custom repository', () => {
5353
{
5454
Ref: 'ClusterDefaultVpcFA9F2722',
5555
},
56-
'","repository":"custom","tag":"v2.3.0"}',
56+
'","image":{"repository":"custom","tag":"v2.3.0"}}',
5757
],
5858
],
5959
},
@@ -74,4 +74,4 @@ test('throws when a policy is not defined for a custom version', () => {
7474
version: AlbControllerVersion.of('custom'),
7575
})).toThrowError("'albControllerOptions.policy' is required when using a custom controller version");
7676

77-
});
77+
});

packages/@aws-cdk/aws-eks/test/integ.alb-controller.expected.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1678,7 +1678,7 @@
16781678
{
16791679
"Ref": "Vpc8378EB38"
16801680
},
1681-
"\",\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.3.0\"}"
1681+
"\",\"image\":{\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.3.0\"}}"
16821682
]
16831683
]
16841684
},
@@ -2348,4 +2348,4 @@
23482348
"Description": "Artifact hash for asset \"06035c90bda92ff37322a329e214af5f2a1e591c6920e0cea4c6816e0f38ac4b\""
23492349
}
23502350
}
2351-
}
2351+
}

packages/@aws-cdk/aws-eks/test/integ.eks-inference.expected.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@
20432043
{
20442044
"Ref": "Vpc8378EB38"
20452045
},
2046-
"\",\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.3.0\"}"
2046+
"\",\"image\":{\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.3.0\"}}"
20472047
]
20482048
]
20492049
},
@@ -2421,4 +2421,4 @@
24212421
"Default": "/aws/service/eks/optimized-ami/1.21/amazon-linux-2-gpu/recommended/image_id"
24222422
}
24232423
}
2424-
}
2424+
}

0 commit comments

Comments
 (0)