I did look through the documentation but didn’t find any option to create any user or database along with the installation. Do we need to do this outside of the cluster installation?
@sohamc well, apart from just connecting to the database and executing the “create …” statements, I don’t have anything.
Also there are some teams using liquibase or similar products to create schemas.
As for ETA - Q2/Q3 more likely, unless someone from the community does it earlier.
Hi @Adrien_Barret , it is under development right now. We will include it as a tech preview in the next PXCO release. I hope we can release PXCO 1.16.0 next month. P.S. As soon as we merge PR you can test it (please use not a production cluster) you can test it to provide feedback.
As a result, the Operator will execute the following statements in the database:
CREATE DATABASE IF NOT EXISTS test1;
CREATE DATABASE IF NOT EXISTS test2;
CREATE USER IF NOT EXISTS 'my-user'@'localhost' IDENTIFIED BY 'password1';
CREATE USER IF NOT EXISTS 'my-user'@'111.111.111.111' IDENTIFIED BY 'password1';
CREATE USER IF NOT EXISTS 'my-user'@'%' IDENTIFIED BY 'password1';
GRANT ALL, REPLICATION SLAVE ON test1.*, test2.* TO 'my-user'@'localhost', 'my-user'@'%', 'my-user'@'111.111.111.111' WITH GRANT OPTION ;
great for me !
May be hosts can be all * by default expet if hosts key is refered but it’s a minor thing.
Password can optional and if not secretRef is referet it would be auto-generated to kept it only into kubernetes too