mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-04 15:08:21 +01:00
Merge pull request #5273 from wy65701436/conf-reg-redis
Update docker registry cache from inmemory to redis.
This commit is contained in:
commit
5357b7ea76
@ -5,13 +5,16 @@ log:
|
|||||||
service: registry
|
service: registry
|
||||||
storage:
|
storage:
|
||||||
cache:
|
cache:
|
||||||
layerinfo: inmemory
|
layerinfo: redis
|
||||||
$storage_provider_info
|
$storage_provider_info
|
||||||
maintenance:
|
maintenance:
|
||||||
uploadpurging:
|
uploadpurging:
|
||||||
enabled: false
|
enabled: false
|
||||||
delete:
|
delete:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
redis:
|
||||||
|
addr: $redis_url
|
||||||
|
db: 1
|
||||||
http:
|
http:
|
||||||
addr: :5000
|
addr: :5000
|
||||||
secret: placeholder
|
secret: placeholder
|
||||||
|
@ -14,15 +14,7 @@ storage:
|
|||||||
enabled: true
|
enabled: true
|
||||||
redis:
|
redis:
|
||||||
addr: $redis_url
|
addr: $redis_url
|
||||||
db: 0
|
db: 1
|
||||||
dialtimeout: 10ms
|
|
||||||
readtimeout: 10ms
|
|
||||||
writetimeout: 10ms
|
|
||||||
pool:
|
|
||||||
maxidle: 16
|
|
||||||
maxactive: 64
|
|
||||||
idletimeout: 300s
|
|
||||||
|
|
||||||
http:
|
http:
|
||||||
addr: :5000
|
addr: :5000
|
||||||
secret: placeholder
|
secret: placeholder
|
||||||
|
10
make/prepare
10
make/prepare
@ -415,7 +415,8 @@ render(os.path.join(templates_dir, "ui", "env"),
|
|||||||
adminserver_url = adminserver_url
|
adminserver_url = adminserver_url
|
||||||
)
|
)
|
||||||
|
|
||||||
registry_config_file = "config_ha.yml" if args.ha_mode else "config.yml"
|
registry_config_file_ha = "config_ha.yml"
|
||||||
|
registry_config_file = "config.yml"
|
||||||
if storage_provider_name == "filesystem":
|
if storage_provider_name == "filesystem":
|
||||||
if not storage_provider_config:
|
if not storage_provider_config:
|
||||||
storage_provider_config = "rootdirectory: /storage"
|
storage_provider_config = "rootdirectory: /storage"
|
||||||
@ -426,6 +427,13 @@ storage_provider_conf_list = [storage_provider_name + ':']
|
|||||||
for c in storage_provider_config.split(","):
|
for c in storage_provider_config.split(","):
|
||||||
storage_provider_conf_list.append(c.strip())
|
storage_provider_conf_list.append(c.strip())
|
||||||
storage_provider_info = ('\n' + ' ' * 4).join(storage_provider_conf_list)
|
storage_provider_info = ('\n' + ' ' * 4).join(storage_provider_conf_list)
|
||||||
|
render(os.path.join(templates_dir, "registry", registry_config_file_ha),
|
||||||
|
registry_conf,
|
||||||
|
storage_provider_info=storage_provider_info,
|
||||||
|
public_url=public_url,
|
||||||
|
ui_url=ui_url,
|
||||||
|
redis_url=redis_url)
|
||||||
|
|
||||||
render(os.path.join(templates_dir, "registry", registry_config_file),
|
render(os.path.join(templates_dir, "registry", registry_config_file),
|
||||||
registry_conf,
|
registry_conf,
|
||||||
storage_provider_info=storage_provider_info,
|
storage_provider_info=storage_provider_info,
|
||||||
|
Loading…
Reference in New Issue
Block a user