fix(pricing): resolve in-partition Pricing region for AWS European Sovereign Cloud (aws-eusc) - #9437
Open
mlopezr wants to merge 2 commits into
Open
fix(pricing): resolve in-partition Pricing region for AWS European Sovereign Cloud (aws-eusc)#9437mlopezr wants to merge 2 commits into
mlopezr wants to merge 2 commits into
Conversation
The Pricing API region is selected by string-prefix matching the cluster region. The European Sovereign Cloud region eusc-de-east-1 does not match the eu- prefix (it starts with eusc-), so it fell through to the default us-east-1 and Karpenter signed the request for the commercial partition while presenting an aws-eusc IAM token, yielding a 400 UnrecognizedClientException. The Pricing API is available in-partition at api.pricing.eusc-de-east-1.amazonaws.eu, so map eusc- regions to eusc-de-east-1. Signed-off-by: Mario <mariolr@amazon.fr>
Author
|
The two failing tests about LaunchTemplate Provider caching appear to be caused by an async-timing race. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(pricing): resolve in-partition Pricing region for AWS European Sovereign Cloud (
aws-eusc)Fixes / Description
On the European Sovereign Cloud region
eusc-de-east-1, Karpenter's pricingreconciler fails continuously with:
Root cause
pkg/providers/pricing/pricing.goNewAPIselects the Pricing API region bystring-prefix matching the cluster region:
eusc-de-east-1starts witheusc-, noteu-, so it falls through to thedefault
us-east-1. Karpenter then signs the Pricing request for the commercialawspartition while presenting anaws-euscIAM token; the commercialendpoint rejects the cross-partition token with
400 UnrecognizedClientException.The Pricing API does exist in-partition at
api.pricing.eusc-de-east-1.amazonaws.eu— the bundled AWS SDK already knowsthe
aws-euscpartition and resolves it correctly once the region is right.Fix
Add an
eusc-branch mapping toeusc-de-east-1:Testing
Deployed Karpenter 1.14.0 into an EKS cluster in
eusc-de-east-1with noAWS_ENDPOINT_URL_*overrides:EC2NodeClassand
NodePoolreachReady=True); only pricing errors with the 400 above.api.pricing.eusc-de-east-1.amazonaws.eu.This confirms the endpoint/partition support for the other services already
works via the vendored SDK — pricing's manual region-prefix table was the sole
remaining gap for
aws-eusc.Notes
existing
us-govskip does) when the Pricing API is unreachable in a givenpartition, so unknown future partitions log once rather than error-looping.