Skip to content

feat(aws): Enable setting custom endpoints for AWS ECR for ECRAuthori…#4821

Merged
Skarlso merged 1 commit intoexternal-secrets:mainfrom
mtweten:custom-ecr-endpoint
Jun 1, 2025
Merged

feat(aws): Enable setting custom endpoints for AWS ECR for ECRAuthori…#4821
Skarlso merged 1 commit intoexternal-secrets:mainfrom
mtweten:custom-ecr-endpoint

Conversation

@mtweten
Copy link
Copy Markdown
Contributor

@mtweten mtweten commented May 21, 2025

…zationToken generator

Problem Statement

The external-secrets AWS provider currently allows setting custom endpoints for the STS, SSM, and SecretsManager services. However, the ECRAuthorizationToken generator does not currently support custom endpoints for the ECR/ECR Public services.

Related Issue

No corresponding issue.

Proposed Changes

Expose environment variables for ECR and ECR public services similar to the existing custom endpoint overrides.

Checklist

  • I have read the contribution guidelines
  • All commits are signed with git commit --signoff
  • My changes have reasonable test coverage
  • All tests pass with make test
  • I ensured my PR is ready for review with make reviewable

@mtweten mtweten requested a review from a team as a code owner May 21, 2025 17:17
@mtweten mtweten requested a review from knelasevero May 21, 2025 17:17
@mtweten
Copy link
Copy Markdown
Contributor Author

mtweten commented May 21, 2025

I noticed on another PR around auth type stuff that this will probably not be accepted due to the aws-go-sdk-v2 upgrade (#4484).

With the upgrade to v2, will the standard AWS_ENDPOINT_URL_* environment variables be supported by default?

@gusfcarvalho
Copy link
Copy Markdown
Member

hi @mtweten !

it's not that it isn't going to be accepted; but we'd like to merge this one after sdk v2 work is finished 😄.

Alternatively, if you can sync and add this contribution to both SDKs (v1 being this one, and another contribution in v2), I see no problem in adding this PR right away.

We just don't want to cause more changes for the volunteers that are pushing sdk v2.

@mtweten
Copy link
Copy Markdown
Contributor Author

mtweten commented May 21, 2025

@gusfcarvalho Thanks for the response! I'm not certain, but I think the v2 upgrade will make it so external-secrets won't need to explicitly provide support for endpoint overrides - I think with v2 AWS_ENDPOINT_URL_* environment variables are supported by default.

I noticed in the v2 PR that both of the existing environment variable overrides, AWS_SSM_ENDPOINT and AWS_SECRETSMANAGER_ENDPOINT, were removed (https://github.com/external-secrets/external-secrets/pull/4484/files#diff-9c6c21b0dfd29225505dd5e59527cc6e2a1cff3bd32c61aa16062df2e6222ae6L24-L26), and I assume that's why. I'll have to test with the v2 changes.

Either way, I'm fine with holding off on this!

@mtweten
Copy link
Copy Markdown
Contributor Author

mtweten commented May 29, 2025

I believe that #4484 is a breaking change since it removed both of the environment variables currently supported to set custom endpoints for the SSM and Secrets Manager services (AWS_SECRETSMANAGER_ENDPOINT and AWS_SSM_ENDPOINT): https://github.com/external-secrets/external-secrets/pull/4484/files#diff-9c6c21b0dfd29225505dd5e59527cc6e2a1cff3bd32c61aa16062df2e6222ae6L24

@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented May 29, 2025

@mtweten
Copy link
Copy Markdown
Contributor Author

mtweten commented May 29, 2025

@Skarlso My bad! I didn't see that they got moved. Thanks for pointing that out

…zationToken generator

Signed-off-by: Michael Tweten <mtweten@gmail.com>
@mtweten mtweten force-pushed the custom-ecr-endpoint branch from b3132b0 to e2ba13a Compare May 29, 2025 19:28
@sonarqubecloud
Copy link
Copy Markdown

@mtweten
Copy link
Copy Markdown
Contributor Author

mtweten commented May 29, 2025

I've updated this PR to use the same pattern for resolving custom endpoints that was used in the aws-go-sdk-v2 update and verified that it works correctly for overriding ECR endpoints.

@Skarlso Skarlso merged commit 1947224 into external-secrets:main Jun 1, 2025
20 checks passed
@mtweten mtweten deleted the custom-ecr-endpoint branch June 2, 2025 17:30
pepordev pushed a commit to pepordev/external-secrets that referenced this pull request Jun 11, 2025
…zationToken generator (external-secrets#4821)

Signed-off-by: Michael Tweten <mtweten@gmail.com>
Signed-off-by: Pedro Parra Ortega <pedro.parraortega@enreach.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants