Read ssl mode param from the adminserver to init the connection with database (#6504)

This commit adds the ssl mode as a param when establishing the connection with database

Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
Wenkai Yin 2018-12-11 13:58:37 +08:00 committed by Yan
parent 7f4dac2101
commit 5388eb4db6

View File

@ -230,6 +230,7 @@ func getDBFromConfig(cfg map[string]interface{}) *models.Database {
postgresql.Username = cfg[common.PostGreSQLUsername].(string)
postgresql.Password = cfg[common.PostGreSQLPassword].(string)
postgresql.Database = cfg[common.PostGreSQLDatabase].(string)
postgresql.SSLMode = cfg[common.PostGreSQLSSLMode].(string)
database.PostGreSQL = postgresql
return database