From b995881cd2a66e7374872dc958a61f3b312894f7 Mon Sep 17 00:00:00 2001 From: Jesse Hu Date: Tue, 16 Jan 2018 12:38:53 +0800 Subject: [PATCH] [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. --- make/common/templates/adminserver/env | 2 +- make/prepare | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/make/common/templates/adminserver/env b/make/common/templates/adminserver/env index 54118c1a2..390a7accb 100644 --- a/make/common/templates/adminserver/env +++ b/make/common/templates/adminserver/env @@ -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 diff --git a/make/prepare b/make/prepare index 6658de07e..e8684686f 100755 --- a/make/prepare +++ b/make/prepare @@ -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,