Skip to content

Commit ed00f24

Browse files
authored
fix(eks): helm private ecr in govcloud (#26794)
Using helm charts in a private ECR repo is not possible in govcloud regions, as the regex is too narrowly defined. This change will properly match against all current AWS regions. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 0aee083 commit ed00f24

File tree

1 file changed

+1
-1
lines changed
  • packages/aws-cdk-lib/aws-eks/lib/kubectl-handler/helm

1 file changed

+1
-1
lines changed

packages/aws-cdk-lib/aws-eks/lib/kubectl-handler/helm/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def helm_handler(event, context):
100100

101101
def get_oci_cmd(repository, version):
102102
# Generates OCI command based on pattern. Public ECR vs Private ECR are treated differently.
103-
private_ecr_pattern = 'oci://(?P<registry>\d+.dkr.ecr.(?P<region>[a-z]+-[a-z]+-\d).amazonaws.com)*'
103+
private_ecr_pattern = 'oci://(?P<registry>\d+.dkr.ecr.(?P<region>[a-z0-9\-]+).amazonaws.com)*'
104104
public_ecr_pattern = 'oci://(?P<registry>public.ecr.aws)*'
105105

106106
private_registry = re.match(private_ecr_pattern, repository).groupdict()

0 commit comments

Comments
 (0)