Skip to content

Commit

Permalink
Enable configuring more s3 backend options via env vars
Browse files Browse the repository at this point in the history
Change-type: minor
  • Loading branch information
Page- committed Jul 29, 2024
1 parent b754c71 commit 666b9ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
24 changes: 1 addition & 23 deletions config/confd/conf.d/docker-registry.yml.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
[template]
src = "docker-registry.yml.tmpl"
dest = "/etc/docker-registry.yml"
keys = [
"COMMON_REGION",
"REGISTRY2_CACHE_ADDR",
"REGISTRY2_CACHE_DB",
"REGISTRY2_CACHE_ENABLED",
"REGISTRY2_DEBUG_ENABLED",
"REGISTRY2_DISABLE_REDIRECT",
"REGISTRY2_HOST",
"REGISTRY2_PROXY_ENABLED",
"REGISTRY2_PROXY_PASSWORD",
"REGISTRY2_PROXY_REMOTE_URL",
"REGISTRY2_PROXY_USERNAME",
"REGISTRY2_S3_BUCKET",
"REGISTRY2_S3_CLOUDFRONT_ENDPOINT",
"REGISTRY2_S3_CLOUDFRONT_KEYPAIR_ID",
"REGISTRY2_S3_KEY",
"REGISTRY2_S3_REGION_ENDPOINT",
"REGISTRY2_S3_SECRET",
"REGISTRY2_SECRETKEY",
"REGISTRY2_STORAGEPATH",
"REGISTRY2_TOKEN_AUTH_ISSUER",
"REGISTRY2_TOKEN_AUTH_REALM"
]
keys = []
4 changes: 4 additions & 0 deletions config/confd/templates/docker-registry.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ storage:
secure: true
v4auth: true
rootdirectory: {{getenv "REGISTRY2_STORAGEPATH"}}
{{if getenv "REGISTRY2_S3_CHUNK_SIZE"}}chunksize: {{getenv "REGISTRY2_S3_CHUNK_SIZE"}}{{end}}
{{if getenv "REGISTRY2_S3_MULTIPART_COPY_CHUNKSIZE"}}multipartcopychunksize: {{getenv "REGISTRY2_S3_MULTIPART_COPY_CHUNKSIZE"}}{{end}}
{{if getenv "REGISTRY2_S3_MULTIPART_COPY_MAX_CONCURRENCY"}}multipartcopymaxconcurrency: {{getenv "REGISTRY2_S3_MULTIPART_COPY_MAX_CONCURRENCY"}}{{end}}
{{if getenv "REGISTRY2_S3_MULTIPART_COPY_THRESHOLD_SIZE"}}multipartcopythresholdsize: {{getenv "REGISTRY2_S3_MULTIPART_COPY_THRESHOLD_SIZE"}}{{end}}
{{else}}
filesystem:
rootdirectory: {{getenv "REGISTRY2_STORAGEPATH"}}
Expand Down

0 comments on commit 666b9ef

Please sign in to comment.