diff options
author | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2020-04-01 06:03:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-04-01 06:03:24 +0000 |
commit | 64e622c75a90be63a55e5b87240084f0a7466633 (patch) | |
tree | 982af16c673b2613c5387b0abfc7183b9692101c /kubernetes/policy/charts | |
parent | 39690f2a3291bb70c6d64f2bb1f4216eeafcf7ba (diff) | |
parent | 02adcb74d77ece36662834ade0f970f597214c1c (diff) |
Merge "[POLICY] Allow to override username and password from env"
Diffstat (limited to 'kubernetes/policy/charts')
-rw-r--r-- | kubernetes/policy/charts/policy-common/resources/config/scripts/do-start.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/kubernetes/policy/charts/policy-common/resources/config/scripts/do-start.sh b/kubernetes/policy/charts/policy-common/resources/config/scripts/do-start.sh index 052b6f2c2f..0e473105a2 100644 --- a/kubernetes/policy/charts/policy-common/resources/config/scripts/do-start.sh +++ b/kubernetes/policy/charts/policy-common/resources/config/scripts/do-start.sh @@ -78,8 +78,17 @@ else # wait for DB up # now that DB is up, invoke database upgrade # (which does nothing if the db is already up-to-date) - dbuser=$(echo $(grep '^JDBC_USER=' base.conf | cut -f2 -d=)) - dbpw=$(echo $(grep '^JDBC_PASSWORD=' base.conf | cut -f2 -d=)) + if [[ -v JDBC_USER ]]; then + dbuser=${JDBC_USER}; + else + dbuser=$(echo $(grep '^JDBC_USER=' base.conf | cut -f2 -d=)) + fi + + if [[ -v JDBC_PASSWORD ]]; then + dbpw=${JDBC_PASSWORD} + else + dbpw=$(echo $(grep '^JDBC_PASSWORD=' base.conf | cut -f2 -d=)) + fi db_upgrade_remote.sh $dbuser $dbpw {{.Values.global.mariadb.service.name}} fi |