Skip to content

Commit

Permalink
Merge pull request deis#79 from bacongobbler/swift-bucket-name
Browse files Browse the repository at this point in the history
fix(create-bucket): set BUCKET_NAME for swift
  • Loading branch information
Matthew Fisher authored Jan 6, 2017
2 parents 86f06d7 + 5aafbac commit f0e1ef9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func main() {
log.Fatal(err)
} else {
os.Setenv("REGISTRY_STORAGE_SWIFT_CONTAINER", string(container))
os.Setenv("BUCKET_NAME", string(container))
}

if authVersion, err := ioutil.ReadFile("/var/run/secrets/deis/registry/creds/authversion"); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion rootfs/bin/create-bucket
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ elif os.getenv('REGISTRY_STORAGE') == "swift":
tenant_name=os.getenv('REGISTRY_STORAGE_SWIFT_TENANT')
)
# swift also does not throw exception if container already exists.
conn.put_container(os.getenv('BUCKET_NAME'))
conn.put_container(bucket_name)

elif os.getenv('REGISTRY_STORAGE') == "s3" and os.getenv('REGISTRY_STORAGE_S3_BACKEND') == 'minio':
botoconfig.add_section('s3')
Expand Down

0 comments on commit f0e1ef9

Please sign in to comment.