spring-cloud-dataflow icon indicating copy to clipboard operation
spring-cloud-dataflow copied to clipboard

MariaDB Database not created automatically

Open david-deck opened this issue 3 years ago • 2 comments

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.

david-deck avatar Dec 05 '21 14:12 david-deck

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.

tzolov avatar Dec 06 '21 18:12 tzolov

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.

markpollack avatar May 17 '22 15:05 markpollack

The files have been updated a while ago.

corneil avatar Dec 05 '22 14:12 corneil