Description
Describe the bug
When using the L2 construct within the aws_eks_v2_alpha
library to define an EKS cluster, specifying an ALB Ingress Controller will cause the stack deployment to fail when using a fully-private cluster (a cluster with a private control plane running in a VPC without any routes to an IGW).
The problem arrises due to the assumption of Internet access within the Helm chart definition of the AlbController
construct:
aws-cdk/packages/@aws-cdk/aws-eks-v2-alpha/lib/alb-controller.ts
Lines 333 to 356 in 6a57c50
Currently the AlbControllerOptions
do not support specifying an alternative repository.
Not sure if this should be a bug or feature request.
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Version
No response
Expected Behavior
Allow alternative location of helm chart assets to be passed when specifying an ALB Controller on a fully-private EKS cluster.
Current Behavior
Although the AlbController
supports specifying an alternative repository, it does not currently support specifying an alternative location for its corresponding helm chart asset:
aws-cdk/packages/@aws-cdk/aws-eks-v2-alpha/lib/alb-controller.ts
Lines 244 to 273 in 6a57c50
As the default helm chart location is not reachable from within a private VPC, enabling the ALB Controller feature of this L2 construct will cause a stack deployment failure.
Reproduction Steps
- Create a VPC with only private subnets, but with access to the necessary VPC Endpoint Interfaces for EKS deployment and operations
- Create a Cluster with an endpoint access of "PRIVATE" and ALB Controller options
Possible Solution
The HelmChart
construct already provides the necessary configuration. Probably the quickest fix would be within AlbControllerOptions
, I suggest replacing the repository
property with a new property (e.g. helmChartOptions
) for HelmChartOptions
, this will allow specifying external chart assets (e.g. an S3 Asset or ECR Repository) as preferred.
Workaround
Use a CDK escape hatch to override properties of the chart resource embedded within the AlbController
construct after specifying an ALB Controller on a cluster.
Additional Information/Context
After drafting this issue, I realise it may be related / duplicate of #33801, I've left this for now as hopefully the analysis completed for this issue will be useful.
CDK CLI Version
2.1002.0 (build 09ef5a0)
Framework Version
No response
Node.js Version
22.14.0
OS
MacOS
Language
Python
Language Version
No response
Other information
No response