Skip to content

Commit

Permalink
fix(eks): helm private ecr in govcloud (#26794)
Browse files Browse the repository at this point in the history
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*
  • Loading branch information
aceat64 authored Aug 23, 2023
1 parent 0aee083 commit ed00f24
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def helm_handler(event, context):

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

private_registry = re.match(private_ecr_pattern, repository).groupdict()
Expand Down

0 comments on commit ed00f24

Please sign in to comment.