spring-cloud-dataflow
spring-cloud-dataflow copied to clipboard
MariaDB Database not created automatically
The "skipper" database is automatically created by an initContainer defined in src/kubernetes/skipper/skipper-deployment.yaml
.
- name: init-mariadb-database
image: mariadb:10.4.22
env:
- name: MARIADB_PWD
valueFrom:
secretKeyRef:
name: mariadb
key: mariadb-root-password
command: ['sh', '-c', 'mariadb -h mariadb -u root --password=$MARIADB_PWD -e "CREATE DATABASE IF NOT EXISTS skipper;"']
There is no such initContainer for the mariadb/server database. Thus, Dataflow Server fails to start.
Thank you @david-deck ! for the server configuration we don't need to create a database explicitly. Instead the default MariaDB database is used. The problem was that i've wrongly assumed that the default MariaDB database is called mariadb
while it is still mysql
and messed up an earlier fix for this. Hopefully this last commit https://github.com/spring-cloud/spring-cloud-dataflow/commit/dedf069dea8aacd06e33c7ad72a25aed78a243b2 will solve the issue.
We will review the kubernetes files for their usage of mysql and change that to mariadb in the next release since that is the default we are switching to going forward.
The files have been updated a while ago.