Skip to content

Conversation

k8s-infra-cherrypick-robot

This is an automated cherry-pick of #5680

/assign damdo

ensure custom service endpoints for supported AWS services are properly selected by
both AWS SDKv2 and SDKv1 service ID (for backwards compatibility)

In AWS SDKv1, each service exports a constant EndpointsID to look up the
custom service endpoint, for example, see ref [0]. In AWS SDKv2, these
contants are no longer available.

Thus, for backwards compatibility, we copy those constants from the
SDKv1 and map them to the corresponding ServiceID in SDK v2.

Additionally, in AWS SDKv1, elb and elbv2 uses the same identifier (i.e.
same EndpointsID), thus the same custom endpoint [1][2]. For backwards
compatibility, if elbv2 endpoint is undefined, elbv2 endpoint resolver
should fall back to elb endpoint if any.

This also fixes the bug where CAPA does not recognize services that define
its serviceID with more than 1 word due to the incorrect assumption [3].

References:

[0] https://github.com/aws/aws-sdk-go/blob/070853e88d22854d2355c2543d0958a5f76ad407/service/resourcegroupstaggingapi/service.go#L33-L34
[1] https://github.com/aws/aws-sdk-go/blob/070853e88d22854d2355c2543d0958a5f76ad407/service/elbv2/service.go#L32-L33
[2] https://github.com/aws/aws-sdk-go/blob/070853e88d22854d2355c2543d0958a5f76ad407/service/elb/service.go#L32-L33
[2] https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/88cb4b92b1a76591623e9d5ef347bfdc22010622/pkg/cloud/endpoints/endpoints.go#L90-L94
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels Sep 23, 2025
@k8s-ci-robot k8s-ci-robot requested review from damdo and faiq September 23, 2025 17:01
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 23, 2025
Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

/assign @nrb @richardcase

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 23, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: e5c4ff7f84516868827265884103043c24c6e6ee

@nrb
Copy link
Contributor

nrb commented Sep 24, 2025

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nrb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2025
@k8s-ci-robot k8s-ci-robot merged commit ecf83e5 into kubernetes-sigs:release-2.9 Sep 24, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants