- API Reference
- Examples
MariaDBUser
This feature is available for the following tiers: Standard, Premium.
Packages:
database.entigo.com/v1alpha1
Resource Types:
MariaDBUser
↩ Parent| Name | Type | Description | Required |
|---|---|---|---|
| apiVersion | string | database.entigo.com/v1alpha1 | true |
| kind | string | MariaDBUser | true |
| metadata | object | Refer to the Kubernetes API documentation for the fields of the metadata field. | true |
| spec | object | false |
MariaDBUser.spec
↩ Parent| Name | Type | Description | Required |
|---|---|---|---|
| databaseRef | object | DatabaseRef references the database object this user is for | true |
| instanceRef | object | true | |
| privileges | []string | Privileges to be granted.
See https://mariadb.com/docs/server/reference/sql-statements/account-management-sql-statements/grant#privilege-levels
for available privileges. | true |
| grant | object | false | |
| maxConnectionsPerHour | number | MaxConnectionsPerHour sets the number of times an account can connect to the server per hour Default: 5 | false |
| maxQueriesPerHour | number | MaxQueriesPerHour sets the number of queries an account can issue per hour Default: 20 | false |
| maxUpdatesPerHour | number | MaxUpdatesPerHour sets the number of updates an account can issue per hour Default: 10 | false |
| maxUserConnections | number | MaxUserConnections sets The number of simultaneous connections to the server by an account Default: 2 | false |
| name | string | Alternative, i.e. non kubernetes compliant name | false |
| table | string | Tables this grant is for, default * Default: * | false |
MariaDBUser.spec.databaseRef
↩ ParentDatabaseRef references the database object this user is for
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | true | |
| namespace | string | false |
MariaDBUser.spec.instanceRef
↩ Parent| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Name of the database instance the user should be created in | true |
MariaDBUser.spec.grant
↩ Parent| Name | Type | Description | Required |
|---|---|---|---|
| users | []string | An array of user names to be granted. | false |
Basic User
A minimal MariaDB User definition showing the required fields only.
apiVersion: database.entigo.com/v1alpha1
kind: MariaDBUser
metadata:
name: basic-user
spec:
instanceRef:
name: basic-instance
databaseRef:
name: basic-database
privileges:
- SELECT
- INSERT
- UPDATE
- DELETE
A MariaDB User definition with full privileges and connection limits.
apiVersion: database.entigo.com/v1alpha1
kind: MariaDBUser
metadata:
name: app-user
spec:
instanceRef:
name: basic-instance
databaseRef:
name: basic-database
table: "*"
privileges:
- ALL PRIVILEGES
maxConnectionsPerHour: 100
maxQueriesPerHour: 1000
maxUpdatesPerHour: 500
maxUserConnections: 10
Prerequisites
The MariaDB User requires the following resources applied:
MariaDBInstance
apiVersion: database.entigo.com/v1alpha1
kind: MariaDBInstance
metadata:
name: basic-instance
spec:
allocatedStorage: 20
instanceType: db.t3.micro
MariaDBDatabase
apiVersion: database.entigo.com/v1alpha1
kind: MariaDBDatabase
metadata:
name: basic-database
spec:
instanceRef:
name: basic-instance