aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/resources
diff options
context:
space:
mode:
authorAndreas Geissler <andreas-geissler@telekom.de>2023-01-25 09:27:30 +0100
committerAndreas Geissler <andreas-geissler@telekom.de>2023-01-25 09:29:38 +0100
commita4275991aff6b4dafb19e57325c04ac0fb811a66 (patch)
tree1398ff9b950ef538a8ec8531df67245e89001fe4 /kubernetes/policy/resources
parent2f43e96c6a84b737590cc4db8a5d53fbac8fd586 (diff)
[POLICY] Use variable MariaDB image for DB jobs
Use default MariaDB version (same as deployed) in the DB scripts Issue-ID: POLICY-4537 Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de> Change-Id: If418f6b35b9f1ecf8631fe002e59d6f9372a979e
Diffstat (limited to 'kubernetes/policy/resources')
-rwxr-xr-xkubernetes/policy/resources/config/db.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/kubernetes/policy/resources/config/db.sh b/kubernetes/policy/resources/config/db.sh
index 866d422c14..36574bc1ad 100755
--- a/kubernetes/policy/resources/config/db.sh
+++ b/kubernetes/policy/resources/config/db.sh
@@ -17,12 +17,12 @@
# limitations under the License.
*/}}
-mysql() { /usr/bin/mysql -h ${MYSQL_HOST} -P ${MYSQL_USER} "$@"; };
+mysqlcmd() { mysql -h ${MYSQL_HOST} -P ${MYSQL_USER} "$@"; };
for db in migration pooling policyadmin policyclamp operationshistory clampacm
do
- mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
- mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
+ mysqlcmd -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
+ mysqlcmd -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
done
mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"