Custom Parameters
As mentioned in Getting Started - Custom Parameters as an end user, an Application Developer has the opportunity to customize their Service Instance by using custom parameters.
The following table shows which custom parameters are available for a9s MariaDB.
Name | Description | Type | Default | Usage Scope |
---|---|---|---|---|
binlog_expire_days | The number of days that the binary log should be kept on the instance that is running MariaDB before purging | A Positive Integer | 7 | service |
databases | List of the names of the databases that should exist in the instance other than the default database. Read more here. | An array of strings | null | service |
grant_performance_schema_permissions | Whether to grant Performance Schema permissions to the Cloud Foundry (CF) binding credentials | Boolean | false | service-credentials |
binlog_expire_days
is available starting from a9s MariaDB 10.4databases
is available starting from a9s MariaDB 10.6grant_performance_schema_permissions
is supported starting from a9s MariaDB 10.6
databases Parameter
This custom parameter allows the Application Developer to create custom databases in their MariaDB instance. However, it's important to mention that there is always a default database that has the same name as the deployment name and it will exist regardless of that parameter value.
For example:
cf create-service a9s-mariadb mariadb-single-small my-mariadb-service
cf update-service my-mariadb-service -c '{"databases" : ["db1", "db2"]}'
In the example above, we first created a mariadb instance, and in the next step we updated the Service Instance to add
two more databases that are called db1
and db2
, so the user databases that will exist in the instance at this point
in time are [default-database
, db1
, db2
].
The databases
parameter is a declarative parameter, this means that every time this parameter is specified, all the
databases that the user wants to keep in the instance should be mentioned in the list and not just the new ones, the
only exception for this rule is the default database.
For example:
cf update-service my-mariadb-service -c '{"databases" : ["db1", "db2"]}'
after this update is done, the instance will have the following databases default-database
, db1
, db2
However, if we update the databases
parameter again:
cf update-service my-mariadb-service -c '{"databases" : ["db1", "db3"]}'
then, the custom database db2
will be dropped because it's not in the list and db3
will be created.
To delete all the custom databases, simply pass an empty list [] to the databases
parameter.
cf update-service my-mariadb-service -c '{"databases" : []}'
All the users that are created either by a service-key or by binding to an app, will have all the necessary privileges on all the user-databases, including the existing users.
databases
ParameterWhen updating the value of the databases
parameter, please make sure to list all the custom databases that must be
kept and not just the ones that should be added, any database that is not specified with the parameter value will be
dropped from the instance, the only exception is the default database.
We consider the backup as the source of truth, that means when restoring a backup, any database that does not exist in the backup file will be dropped.
Grant Performance Schema Permissions
This parameter grants the necessary permissions for using the Performance Schema feature only to the Cloud Foundry (CF) binding credentials. As a result, only the credentials created through this parameter will have access to and be able to modify the some Performance Schema tables.
It must be specified during credentials creation (cf create-service-key
) for the specific CF Service Key.
See the example below:
cf create-service-key my-mariadb-service my-key -c '{"grant_performance_schema_permissions" : true}'
If you need to undo this action, simply remove the CF service key. See the example below:
cf delete-service-key my-mariadb-service my-key
Use this parameter with caution; otherwise, it may lead to a degradation in overall database performance.