mysql-operator icon indicating copy to clipboard operation
mysql-operator copied to clipboard

Multiple databases

Open brianjjohnson opened this issue 6 years ago • 4 comments

We leverage multiple schemas inside a single Db, is there a way I can either have the boot process create two schemas?

If not - then is there a way to mount a SQL file via a secret (Re: MySQL container /docker-entrypoint-initdb.d )

brianjjohnson avatar Sep 16 '19 16:09 brianjjohnson

Hi @brianjjohnson, It's not possible to specify at bootstrap to create more than one schema. This is what docker image supports.

It's a good idea to support custom SQL files, at bootstrap time, which can configure the cluster. I will be happy to review and merge such a feature.

What we would like to implement regarding this issue is a Database CRD (and controller) that provisions databases in a cluster. But this is another discussion.

AMecea avatar Sep 18 '19 15:09 AMecea

This ticket has been open for some time now. Is there any news on this in the meantime?

blafasel42 avatar Jul 16 '21 13:07 blafasel42

Hi @blafasel42, we have implemented new CRDs that are included in version 0.5.0 which is relased as 0.5.0-rc.3.

Here are an example of user and database: https://github.com/presslabs/mysql-operator/blob/master/examples/example-user.yaml https://github.com/presslabs/mysql-operator/blob/master/examples/example-database.yaml

AMecea avatar Jul 16 '21 15:07 AMecea

upgrade to 0.5.0-rc.3 did not work for me. controller would not start.

blafasel42 avatar Jul 19 '21 10:07 blafasel42