bitpoke / mysql-operator

Asynchronous MySQL Replication on Kubernetes using Percona Server and Openark's Orchestrator.
https://www.bitpoke.io/docs/mysql-operator/getting-started/
Apache License 2.0
993 stars 275 forks source link

Multiple databases #393

Open brianjjohnson opened 4 years ago

brianjjohnson commented 4 years ago

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 )

AMecea commented 4 years ago

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.

blafasel42 commented 2 years ago

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

AMecea commented 2 years ago

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

blafasel42 commented 2 years ago

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