[Issue 4015] Read reload_config option from harbor.cfg

If reload_config is true, Harbor will reload all configuration
in harbor.cfg when restarting. It's false by default.
This commit is contained in:
Jesse Hu 2018-01-16 12:38:53 +08:00
parent a9fe5564df
commit b995881cd2
2 changed files with 4 additions and 1 deletions

View File

@ -44,7 +44,7 @@ CLAIR_DB_HOST=$clair_db_host
CLAIR_DB_PORT=$clair_db_port
CLAIR_DB_USERNAME=$clair_db_username
CLAIR_DB=$clair_db
RESET=false
RESET=$reload_config
UAA_ENDPOINT=$uaa_endpoint
UAA_CLIENTID=$uaa_clientid
UAA_CLIENTSECRET=$uaa_clientsecret

View File

@ -191,6 +191,8 @@ rcp = ConfigParser.RawConfigParser()
rcp.readfp(conf)
validate(rcp, args)
reload_config = rcp.get("configuration", "reload_config") if rcp.has_option(
"configuration", "reload_config") else "false"
hostname = rcp.get("configuration", "hostname")
protocol = rcp.get("configuration", "ui_url_protocol")
ui_url = protocol + "://" + hostname
@ -305,6 +307,7 @@ else:
render(os.path.join(templates_dir, "adminserver", "env"),
adminserver_conf_env,
reload_config=reload_config,
ui_url=ui_url,
auth_mode=auth_mode,
self_registration=self_registration,