component-database
Provisions a MySQL database for the project via the in-cluster MySQLApp CRD (Percona). The actual DB pods come from the Percona operator; this component just defines a MySQLApp resource that the operator picks up.
Enable it
component-database:
enabled: true
That's usually enough — the chart fills the rest from global.projectSlug, global.environmentSlug, and global.secretName.
Defaults
parameters:
user: "" # falls back to global.projectSlug
secretName: "" # falls back to global.secretName
privilegeTier: admin
provider: percona-mysql-config
passwordField: DATABASE_PASSWORD
additionalDatabases: []
Custom user name
The MySQL user and database are named <short-env>-<user> (e.g. stg-my-project). MySQL limits user names to 32 characters, so projects with a long global.projectSlug must set a shorter parameters.user:
component-database:
enabled: true
parameters:
user: my-shorter-name
This only affects the database and user name. The password is always read from the secret in the namespace where the MySQLApp claim lives.
Additional databases
Some projects need more than one database (e.g. for migrations or sidecars):
component-database:
enabled: true
parameters:
additionalDatabases:
- my-project-migration
Environment naming quirk
If global.environmentSlug is prod, the rendered environment becomes "production". Anything else passes through verbatim (e.g. staging, sprint).