Reload the attributes of Harbor db and Clair db when restart Harbor. (#4349)

This commit is contained in:
yixingjia 2018-03-12 15:40:45 +08:00 committed by Daniel Jiang
parent 11254a024d
commit ac05806dec

View File

@ -152,6 +152,13 @@ var (
repeatLoadEnvs = map[string]interface{}{ repeatLoadEnvs = map[string]interface{}{
common.ExtEndpoint: "EXT_ENDPOINT", common.ExtEndpoint: "EXT_ENDPOINT",
common.MySQLPassword: "MYSQL_PWD", 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{ common.MaxJobWorkers: &parser{
env: "MAX_JOB_WORKERS", env: "MAX_JOB_WORKERS",
parse: parseStringToInt, parse: parseStringToInt,
@ -170,6 +177,12 @@ var (
parse: parseStringToBool, parse: parseStringToBool,
}, },
common.ClairDBPassword: "CLAIR_DB_PASSWORD", 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.UAAEndpoint: "UAA_ENDPOINT",
common.UAAClientID: "UAA_CLIENTID", common.UAAClientID: "UAA_CLIENTID",
common.UAAClientSecret: "UAA_CLIENTSECRET", common.UAAClientSecret: "UAA_CLIENTSECRET",