-
Notifications
You must be signed in to change notification settings - Fork 31
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
Make database character encoding configurable #172
Make database character encoding configurable #172
Conversation
When a MariaDBDatabase CR is reconciled, a database is created with a default character encoding and collation of latin1. Instead of falling back to the server's default encoding for database creation, expose the encoding in the MariaDBDatabase CRD and default to utf8, as it expected by various Openstack projects.
/test mariadb-operator-build-deploy-kuttl |
1 similar comment
/test mariadb-operator-build-deploy-kuttl |
/lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: beagles, dciabrin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
343ccf4
into
openstack-k8s-operators:main
@@ -35,11 +35,23 @@ spec: | |||
spec: | |||
description: MariaDBDatabaseSpec defines the desired state of MariaDBDatabase | |||
properties: | |||
defaultCharacterSet: | |||
default: utf8 |
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.
how come we went with utf8 and not utf8mb4 ? https://mariadb.com/kb/en/unicode/
kind: TestAssert | ||
commands: | ||
- script: | | ||
oc rsh -n ${NAMESPACE} -c galera openstack-galera-0 /bin/sh -c 'mysql -uroot -p${DB_ROOT_PASSWORD} -Nse "select @@character_set_database;" kuttldb_latin1' | grep -o -w latin1 |
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.
im doing some testing with kuttl now, using a similar file with commands/script, and I think the individual lines here that are doing "oc" + "grep" need to be separate "command" instances, since if the first grep finds nothing, the script keeps going and the return code is lost. ive confirmed the first line wont fail the test unless it's the only line.
When a MariaDBDatabase CR is reconciled, a database is created with a default character encoding and collation of latin1.
Instead of falling back to the server's default encoding for database creation, expose the encoding in the MariaDBDatabase CRD and default to utf8, as it expected by various Openstack projects.