From ac05806decc55f4628e7e8e51edab6405a0606e4 Mon Sep 17 00:00:00 2001 From: yixingjia Date: Mon, 12 Mar 2018 15:40:45 +0800 Subject: [PATCH] Reload the attributes of Harbor db and Clair db when restart Harbor. (#4349) --- src/adminserver/systemcfg/systemcfg.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/adminserver/systemcfg/systemcfg.go b/src/adminserver/systemcfg/systemcfg.go index b188fbfde..664d669d9 100644 --- a/src/adminserver/systemcfg/systemcfg.go +++ b/src/adminserver/systemcfg/systemcfg.go @@ -152,6 +152,13 @@ var ( repeatLoadEnvs = map[string]interface{}{ common.ExtEndpoint: "EXT_ENDPOINT", common.MySQLPassword: "MYSQL_PWD", + common.MySQLHost: "MYSQL_HOST", + common.MySQLUsername: "MYSQL_USR", + common.MySQLDatabase: "MYSQL_DATABASE", + common.MySQLPort: &parser{ + env: "MYSQL_PORT", + parse: parseStringToInt, + }, common.MaxJobWorkers: &parser{ env: "MAX_JOB_WORKERS", parse: parseStringToInt, @@ -170,6 +177,12 @@ var ( parse: parseStringToBool, }, common.ClairDBPassword: "CLAIR_DB_PASSWORD", + common.ClairDBHost: "CLAIR_DB_HOST", + common.ClairDBUsername: "CLAIR_DB_USERNAME", + common.ClairDBPort: &parser{ + env: "CLAIR_DB_PORT", + parse: parseStringToInt, + }, common.UAAEndpoint: "UAA_ENDPOINT", common.UAAClientID: "UAA_CLIENTID", common.UAAClientSecret: "UAA_CLIENTSECRET",