Skip to content

Commit

Permalink
wip: support new aws regions without code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
flavianmissi committed Nov 6, 2024
1 parent 5d5deb1 commit c8c8ed2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/storage/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,13 @@ func (d *driver) ConfigEnv() (envs envvar.List, err error) {

if len(d.Config.RegionEndpoint) != 0 {
envs = append(envs, envvar.EnvVar{Name: "REGISTRY_STORAGE_S3_REGIONENDPOINT", Value: d.Config.RegionEndpoint})
} else {
// attempt to bypass validation error in distribution as a means
// to support new aws regions without requiring aws-sdk-go upgrades.
regionEndpoint, _ := d.endpointsResolver.EndpointFor("s3", d.Config.Region)
if regionEndpoint != "" {
envs = append(envs, envvar.EnvVar{Name: "REGISTRY_STORAGE_S3_REGIONENDPOINT", Value: regionEndpoint})
}
}

if len(d.Config.KeyID) != 0 {
Expand Down

0 comments on commit c8c8ed2

Please sign in to comment.