mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Merge pull request #6090 from justinsb/use_s3_bucket_location
Use the correct region for the S3 bucket
This commit is contained in:
commit
a4daa88fdc
@ -236,8 +236,9 @@ function upload-server-tars() {
|
||||
aws s3 mb "s3://${AWS_S3_BUCKET}" --region ${AWS_S3_REGION}
|
||||
fi
|
||||
|
||||
local s3_url_base=https://s3-${AWS_S3_REGION}.amazonaws.com
|
||||
if [[ "${AWS_S3_REGION}" == "us-east-1" ]]; then
|
||||
local s3_bucket_location=$(aws --output text s3api get-bucket-location --bucket ${AWS_S3_BUCKET})
|
||||
local s3_url_base=https://s3-${s3_bucket_location}.amazonaws.com
|
||||
if [[ "${s3_bucket_location}" == "us-east-1" ]]; then
|
||||
# us-east-1 does not follow the pattern
|
||||
s3_url_base=https://s3.amazonaws.com
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user