Repository navigation
Commit 0da25e5
authored
fix(eks): add support of Helm charts located in ECR of AWS CN region (#29778)
### Issue # (if applicable)
Closes #28460.
### Reason for this change
Current implementation will not identity helm charts stored in ECR on AWS CN regions, and will treat ECR as simple, unauthorized repository.
### Description of changes
This change add support of ECR on AWS CN region by adding a optional suffix of .cn to the regex.
### Description of how you validated changes
Run the affected regex against helm repo in ECR China (123456789012.dkr.ecr.cn-northwest-1.amazonaws.com.cn)
```
import re
repository = 'oci://123456789012.dkr.ecr.cn-northwest-1.amazonaws.com.cn'
private_ecr_pattern = 'oci://(?P<registry>\d+\.dkr\.ecr\.(?P<region>[a-z0-9\-]+)\.amazonaws\.com(\.cn)?)*'
private_registry = re.match(private_ecr_pattern, repository).groupdict()
print(private_registry['registry'])
```
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*1 parent 375f1a6 commit 0da25e5
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
0 commit comments