@@ -26,30 +26,30 @@ common: &common
2626 tags_cache_ttl : _env:MIRROR_TAGS_CACHE_TTL:172800 # seconds
2727
2828 cache :
29- host : {{ or (.deis_cache_host) "" }}
30- port : {{ or (.deis_cache_port) "" }}
29+ host : {{ if exists "/deis/cache/host" }}{{ getv "/deis/cache/host" }}{{ else }}""{{ end }}
30+ port : {{ if exists "/deis/cache/port" }}{{ getv "/deis/cache/port" }}{{ else }}""{{ end }}
3131 password : _env:CACHE_REDIS_PASSWORD
3232 db : 1
3333
3434 # Enabling LRU cache for small files
3535 # This speeds up read/write on small files
3636 # when using a remote storage backend (like S3).
3737 cache_lru :
38- host : {{ or (.deis_cache_host) "" }}
39- port : {{ or (.deis_cache_port) "" }}
38+ host : {{ if exists "/deis/cache/host" }}{{ getv "/deis/cache/host" }}{{ else }}""{{ end }}
39+ port : {{ if exists "/deis/cache/port" }}{{ getv "/deis/cache/port" }}{{ else }}""{{ end }}
4040 password : _env:CACHE_LRU_REDIS_PASSWORD
4141 db : 2
4242
4343 # Enabling these options makes the Registry send an email on each code Exception
44- {{ if .deis_registry_smtpHost }}
44+ {{ if exists "/deis/registry/smtpHost" }}
4545 email_exceptions :
46- smtp_host : {{ or (.deis_registry_smtpHost) "" }}
47- smtp_port : {{ or (.deis_registry_smtpPort) " 25" }}
48- smtp_login : {{ or (.deis_registry_smtpLogin) "" }}
49- smtp_password : {{ or (.deis_registry_smtpPassword) "" }}
50- smtp_secure : bool({{ or (.deis_registry_smtpSecure) " false" }})
51- from_addr : {{ or (.deis_registry_smtpFrom) " docker-registry@localdomain.local" }}
52- to_addr : {{ or (.deis_registry_smtpTo) " noise+dockerregistry@localdomain.local" }}
46+ smtp_host : {{ if exists "/deis/registry/smtpHost" }}{{ getv "/deis/registry/smtpHost" }}{{ else }}""{{ end }}
47+ smtp_port : {{ if exists "/deis/registry/smtpPort" }}{{ getv "/deis/registry/smtpPort" }}{{ else }}" 25"{{ end }}
48+ smtp_login : {{ if exists "/deis/registry/smtpLogin" }}{{ getv "/deis/registry/smtpLogin" }}{{ else }}""{{ end }}
49+ smtp_password : {{ if exists "/deis/registry/smtpPassword" }}{{ getv "/deis/registry/smtpPassword" }}{{ else }}""{{ end }}
50+ smtp_secure : bool({{ if exists "/deis/registry/smtpSecure" }}{{ getv "/deis/registry/smtpSecure" }}{{ else }}" false"{{ end }})
51+ from_addr : {{ if exists "/deis/registry/smtpFrom" }}{{ getv "/deis/registry/smtpFrom" }}{{ else }}" docker-registry@localdomain.local"{{ end }}
52+ to_addr : {{ if exists "/deis/registry/smtpTo" }}{{ getv "/deis/registry/smtpTo" }}{{ else }}" noise+dockerregistry@localdomain.local"{{ end }}
5353 {{ end }}
5454
5555 # Enable bugsnag (set the API key)
@@ -78,30 +78,30 @@ local: &local
7878s3 : &s3
7979 << : *common
8080 storage : s3
81- s3_region : {{ or (.deis_registry_s3region) "" }}
82- s3_bucket : {{ or (.deis_registry_s3bucket) "" }}
83- boto_bucket : {{ or (.deis_registry_s3bucket) "" }}
84- storage_path : {{ or (.deis_registry_s3path) "/registry" }}
85- s3_encrypt : bool({{ or (.deis_registry_s3encrypt) " true" }})
86- s3_secure : bool({{ or (.deis_registry_s3secure) " true" }})
87- s3_access_key : {{ or (.deis_registry_s3accessKey) "" }}
88- s3_secret_key : {{ or (.deis_registry_s3secretKey) "" }}
81+ s3_region : {{ if exists "/deis/registry/s3region" }}{{ getv "/deis/registry/s3region" }}{{ else }}""{{ end }}
82+ s3_bucket : {{ if exists "/deis/registry/s3bucket" }}{{ getv "/deis/registry/s3bucket" }}{{ else }}""{{ end }}
83+ boto_bucket : {{ if exists "/deis/registry/s3bucket" }}{{ getv "/deis/registry/s3bucket" }}{{ else }}""{{ end }}
84+ storage_path : {{ if exists "/deis/ registry/s3path" }}{{ getv "/deis/registry/s3path" }}{{ else }}"/registry"{{ end }}
85+ s3_encrypt : bool({{ if exists "/deis/registry/s3encrypt" }}{{ getv "/deis/registry/s3encrypt" }}{{ else }}" true"{{ end }})
86+ s3_secure : bool({{ if exists "/deis/registry/s3secure" }}{{ getv "/deis/registry/s3secure" }}{{ else }}" true"{{ end }})
87+ s3_access_key : {{ if exists "/deis/registry/s3accessKey" }}{{ getv "/deis/registry/s3accessKey" }}{{ else }}""{{ end }}
88+ s3_secret_key : {{ if exists "/deis/registry/s3secretKey" }}{{ getv "/deis/registry/s3secretKey" }}{{ else }}""{{ end }}
8989
9090# Ceph Object Gateway Configuration
9191# See http://ceph.com/docs/master/radosgw/ for details on installing this service.
9292ceph-s3 : &ceph-s3
9393 << : *common
9494 storage : s3
9595 s3_region : ~
96- s3_bucket : {{ .deis_registry_bucketName }}
96+ s3_bucket : {{ getv "/deis/registry/bucketName" }}
9797 s3_encrypt : false
9898 s3_secure : false
9999 storage_path : /registry
100- s3_access_key : {{ .deis_store_gateway_accessKey }}
101- s3_secret_key : {{ .deis_store_gateway_secretKey }}
102- boto_bucket : {{ .deis_registry_bucketName }}
103- boto_host : {{ .deis_store_gateway_host }}
104- boto_port : {{ .deis_store_gateway_port }}
100+ s3_access_key : {{ getv "/deis/store/gateway/accessKey" }}
101+ s3_secret_key : {{ getv "/deis/store/gateway/secretKey" }}
102+ boto_bucket : {{ getv "/deis/registry/bucketName" }}
103+ boto_host : {{ getv "/deis/store/gateway/host" }}
104+ boto_port : {{ getv "/deis/store/gateway/port" }}
105105 boto_debug : 0
106106 boto_calling_format : boto.s3.connection.OrdinaryCallingFormat
107107
@@ -131,12 +131,12 @@ swift: &swift
131131 storage : swift
132132 storage_path : _env:STORAGE_PATH:/registry
133133 # keystone authorization
134- swift_authurl : {{ or (.deis_registry_swiftAuthURL) "" }}
135- swift_container : {{ or (.deis_registry_swiftContainer) "" }}
136- swift_user : {{ or (.deis_registry_swiftUser) "" }}
137- swift_password : {{ or (.deis_registry_swiftPassword) "" }}
138- swift_tenant_name : {{ or (.deis_registry_swiftTenantName) "" }}
139- swift_region_name : {{ or (.deis_registry_swiftRegionName) "" }}
134+ swift_authurl : {{ if exists "/deis/registry/swiftAuthURL" }}{{ getv "/deis/registry/swiftAuthURL" }}{{ else }}""{{ end }}
135+ swift_container : {{ if exists "/deis/registry/swiftContainer" }}{{ getv "/deis/registry/swiftContainer" }}{{ else }}""{{ end }}
136+ swift_user : {{ if exists "/deis/registry/swiftUser" }}{{ getv "/deis/registry/swiftUser" }}{{ else }}""{{ end }}
137+ swift_password : {{ if exists "/deis/registry/swiftPassword" }}{{ getv "/deis/registry/swiftPassword" }}{{ else }}""{{ end }}
138+ swift_tenant_name : {{ if exists "/deis/registry/swiftTenantName" }}{{ getv "/deis/registry/swiftTenantName" }}{{ else }}""{{ end }}
139+ swift_region_name : {{ if exists "/deis/registry/swiftRegionName" }}{{ getv "/deis/registry/swiftRegionName" }}{{ else }}""{{ end }}
140140
141141# This flavor stores the images in Glance (to integrate with openstack)
142142# See also: https://github.com/dotcloud/openstack-docker
@@ -194,7 +194,7 @@ prod:
194194
195195# Flavor used by deis
196196deis :
197- {{ if .deis_registry_s3accessKey }}<<: *s3
198- {{ else if .deis_registry_swiftAuthURL }} <<: *openstack-swift
197+ {{ if exists "/deis/registry/s3accessKey" }}<<: *s3
198+ {{ else if exists "/deis/registry/swiftAuthURL" }} <<: *openstack-swift
199199 {{ else }} <<: *ceph-s3
200200 {{ end }}
0 commit comments