-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature](WPN-267) Place the new database in the least populated mariadb #26
base: main
Are you sure you want to change the base?
Conversation
Needs a `lock` system to work properly, that's why it's a wip commit...
…ols the CRD existence
… only if not exists already)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some parts mix 2 and 4 spaces indentations, I would recommend 4 spaces everywhere as in PEP8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use 4 spaces whenever possible to fit to PEP8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some mariadb_min_name
variable in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the mariadb_name = prefix + self.name
is still what we want. As we are getting more that one MariaDB (servers), prefixing the database's name with the server name might be useful to distinguish them in a kubectl get dmdb
output.
$ kubectl get dmdb
NAME READY STATUS CHARSET COLLATE MARIADB AGE NAME
mariadb-wp-db-www True Created utf8mb4 utf8mb4_unicode_ci mariadb 7d21h wp-db-www
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add mariadb_name into the database_name, before doing the deletion of a DB into the operator, self.delete_custom_object_mariadb(self.prefix['db'], "databases")
, we need to look for the exact name of the DB by doing a kubectl get databases
and filter on the one that contains the name specified into the CR, as we don't know in which mariadb the database is.
Peer programming with @Azecko and @obieler