-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
schnauzer: add support for update repositories in China #2285
Conversation
Added |
7d48c77
to
090ea8a
Compare
Rebased. |
090ea8a
to
387a607
Compare
Added symlinks for |
387a607
to
50b6eab
Compare
|
sources/api/schnauzer/src/helpers.rs
Outdated
match partition { | ||
"aws-cn" => format!("https://{}.s3.{}.amazonaws.com.cn/latest", bucket, region), | ||
_ => format!("https://{}.s3.{}.amazonaws.com/latest", bucket, region), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per discussion, we should try to use the dual stack endpoints here for forward compatibility with IPv6-only subnets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than just specifying the bucket, I appended .s3.dualstack
to the strings directly (and verified it still works for cn-north-1 and cn-northwest-1). In the event that we add a region that does not support dual stack endpoints we can just do <bucket_id>.s3
. We could get fancier with the map, but I wanted to keep things simple.
AWS variants now generate the `settings.updates.targets-base-url` setting based on region.
50b6eab
to
97ab305
Compare
Tweaked the code a bit to support virtual hosted-style dual-stack s3 endpoints for forward compatibility with IPv6-only subnets. |
Description of changes:
This adds helpers that settings generators can use to set the
updates.metadata-base-url
andupdates.targets-base-url
values to regionalized repositories. For now, this only includes China regionscn-north-1
andcn-northwest-1
, while current regions will continue to use the public updates repository, updates.bottlerocket.aws.Testing done:
Built and launched Bottlerocket and verified the expected
updates
settings in:Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.