mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-02 05:59:18 +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
|
||||
storage:
|
||||
cache:
|
||||
layerinfo: inmemory
|
||||
layerinfo: redis
|
||||
$storage_provider_info
|
||||
maintenance:
|
||||
uploadpurging:
|
||||
enabled: false
|
||||
delete:
|
||||
enabled: true
|
||||
redis:
|
||||
addr: $redis_url
|
||||
db: 1
|
||||
http:
|
||||
addr: :5000
|
||||
secret: placeholder
|
||||
|
@ -14,15 +14,7 @@ storage:
|
||||
enabled: true
|
||||
redis:
|
||||
addr: $redis_url
|
||||
db: 0
|
||||
dialtimeout: 10ms
|
||||
readtimeout: 10ms
|
||||
writetimeout: 10ms
|
||||
pool:
|
||||
maxidle: 16
|
||||
maxactive: 64
|
||||
idletimeout: 300s
|
||||
|
||||
db: 1
|
||||
http:
|
||||
addr: :5000
|
||||
secret: placeholder
|
||||
|
10
make/prepare
10
make/prepare
@ -415,7 +415,8 @@ render(os.path.join(templates_dir, "ui", "env"),
|
||||
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 not storage_provider_config:
|
||||
storage_provider_config = "rootdirectory: /storage"
|
||||
@ -426,6 +427,13 @@ storage_provider_conf_list = [storage_provider_name + ':']
|
||||
for c in storage_provider_config.split(","):
|
||||
storage_provider_conf_list.append(c.strip())
|
||||
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),
|
||||
registry_conf,
|
||||
storage_provider_info=storage_provider_info,
|
||||
|
Loading…
Reference in New Issue
Block a user