Overview
MariaDB is an open-source relational database management system and a drop-in replacement for MySQL. This template deploys a single-replica MariaDB instance with persistent storage, an optional phpMyAdmin console, and optional scheduled dumps to AWS S3 or GCS. Every credential comes from a secret you create before installing. Nothing sensitive passes through Helm values, so no password lands in the release, the stored workload spec, or the logs.MariaDB on Control Plane operates as a single-replica deployment. Do not scale up the replica count, as this would result in multiple isolated instances rather than a replicated cluster.
What Gets Created
- Stateful MariaDB Workload —
{release}-maria, a single-replica MariaDB container serving TCP on port3306, with configurable resources. - Volume Set —
{release}-maria-vs, anext4volume mounted at/var/lib/mysqlholding all database data, with optional autoscaling. - Identity & Policy —
{release}-maria-identityand{release}-maria-policy, granting the database and backup workloadsrevealon exactly the two credential secrets you created, and nothing else. Cloud storage access is added to the identity when backup is enabled. - phpMyAdmin Workload (optional) —
{release}-phpmyadmin, a browser-based database console on port80. Off by default, and internal-only when enabled. - Backup Cron Workload (optional) —
{release}-maria-backup, a scheduledmysqldumpjob that writes compressed dumps to AWS S3 or GCS.
This template creates no secret of its own. Both credentials live in secrets you own, which means uninstalling the release never destroys them.
This template does not create a GVC. You must deploy it into an existing GVC.
Prerequisites
Two secrets must exist before you install. They are deliberately separate: granting an applicationreveal on the database credentials must not also hand it the MariaDB root account. Secrets are org-level, so no GVC flag is involved.
1
Create the application credentials secret
A dictionary secret holding exactly three keys — Set
username, password and database. MariaDB creates this user and this database on first boot, and this is the credential your applications put in their connection strings:credentialsSecretName to the name you used.2
Create the root password secret
An opaque secret with encoding Set
plain, whose payload is the MariaDB root password:rootPasswordSecretName to the name you used.3
Read either credential back later
Installation
To install, follow the instructions for your preferred method:UI
Browse, install, and manage templates visually
CLI
Manage templates from your terminal
Terraform
Declare templates in your Terraform configurations
Pulumi
Declare templates in your Pulumi programs
ready roughly 40 seconds after install, once its readiness probe has authenticated against the root password from your secret.
Upgrading From 1.3.2 or Earlier
Version1.4.0 moved every credential out of Helm values and closed the phpMyAdmin console by default. Earlier versions shipped working defaults — a root-password root password and a password user password — behind a console that was enabled and published to the entire internet with no way to turn it off.
To upgrade an existing install:
1
Create the two secrets
Follow Prerequisites. Set their contents to the credentials your database already uses if you want existing applications to keep connecting unchanged.
2
Drop the removed keys from your values
Remove
config in its entirety and enablePhpMyAdmin. Set credentialsSecretName and rootPasswordSecretName instead, and set phpMyAdmin.enabled: true if you still want the console.3
Upgrade
The upgrade restarts the single replica; data on the volume set is untouched.
Credentials are read only when the data directory is first initialized, so an upgrade does not rewrite them. If the secrets you create hold different values from the ones the volume was built with, the database keeps its existing users and passwords — change them with
ALTER USER from inside MariaDB.Configuration
The defaultvalues.yaml for this template:
Credentials
credentialsSecretName— Name of the dictionary secret holdingusername,passwordanddatabase. MariaDB creates that user and that database on first boot.rootPasswordSecretName— Name of the opaque secret (encodingplain) holding therootpassword.
cpln://secret/... in the workload, so the values you install with contain only the secret names. The policy grants reveal on exactly these two secrets, and an application handed the dictionary secret has no path to the root account — the application password is rejected as root.
Credentials are applied only on first startup, while the data directory is empty. Rotating either secret afterwards does not change the stored passwords; use MariaDB’s native commands (for example
ALTER USER) on a running instance.Resources
resources.minCpu/resources.minMemory— Minimum CPU and memory guaranteed to the workload.resources.maxCpu/resources.maxMemory— Maximum CPU and memory the workload can use.timeoutSeconds— Workload timeout in seconds.
Storage
volumeset.capacity— Initial volume size in GiB (minimum 10).volumeset.autoscaling.enabled— Automatically expand the volume as it fills. When enabled:maxCapacity— Maximum volume size in GiB.minFreePercentage— Trigger a scale-up when free space drops below this percentage.scalingFactor— Multiply the current capacity by this factor when scaling up.
cpln helm uninstall deletes the volume set, and the database with it.
Internal Access
internalAccess.type— Controls which workloads can connect to MariaDB on port3306:
internalAccess.workloads— Workload links (//gvc/GVC_NAME/workload/WORKLOAD_NAME), used only whentypeisworkload-list.
phpMyAdmin
phpMyAdmin.enabled— Deploy a phpMyAdmin console alongside the database. Off by default.phpMyAdmin.image— Pinned console image (phpmyadmin:5.2.3-apache, the official Docker library repository).phpMyAdmin.publicAccess.enabled— Publish the console, and its login form, to the whole internet. Off by default.phpMyAdmin.internalAccess— Which workloads may reach the console, using the sametypevalues as the database’s owninternalAccess. This knob governs the console only; the database has its own.phpMyAdmin.resources.cpu/phpMyAdmin.resources.memory— Resources for the console container.
root plus the root password there. Nothing is pre-filled, and a compromise of the console container yields no password.
Access changes take a short while to propagate. Turning
publicAccess on was measured returning 421, then 503, then 200 over roughly 34 seconds — a request made immediately after the upgrade is not evidence that the knob failed. Toggling console access re-applies only the console workload; the database is not restarted.Connecting to MariaDB
Backup
Backup is disabled by default. When enabled, a cron workload dumps the database named in your credentials secret and uploads a compressed dump to AWS S3 or GCS on the configured schedule.backup.enabled— Enable scheduled backups.backup.image— Backup container image, compatible with all MariaDB versions.backup.schedule— Cron expression for backup frequency (default: daily at 2am UTC).backup.provider—awsorgcp.backup.resources.cpu/backup.resources.memory— Resources for the backup cron container.
AWS S3
Before enabling backup withprovider: aws, complete the following in your AWS account:
- Create an S3 bucket. Set
backup.aws.bucketto its name andbackup.aws.regionto its region. - If you do not have a Cloud Account set up, refer to the docs to Create a Cloud Account. Set
backup.aws.cloudAccountNameto its name. - Create an IAM policy with the following JSON, replacing
YOUR_BUCKET_NAME:
- Set
backup.aws.policyNameto the name of the policy created in step 3. - Set
backup.aws.prefixto the folder path where backups will be stored.
GCS
Before enabling backup withprovider: gcp, complete the following in your GCP account:
- Create a GCS bucket. Set
backup.gcp.bucketto its name. - If you do not have a Cloud Account set up, refer to the docs to Create a Cloud Account. Set
backup.gcp.cloudAccountNameto its name. - Add the Storage Admin role to the GCP service account associated with the Cloud Account. The template binds
roles/storage.objectAdminon exactly that bucket. - Set
backup.gcp.prefixto the folder path where backups will be stored.
Restoring a Backup
Run the following from a client with access to the backup bucket. For GCS, replaceaws s3 cp s3://... with gsutil cp gs://.... Add -p to have the client prompt for the root password, which you can read with cpln secret reveal ROOT_SECRET_NAME.
External References
MariaDB Documentation
Official MariaDB documentation
phpMyAdmin Documentation
phpMyAdmin user documentation
Backup Image Source
Source code for the MySQL backup container image
MariaDB Template
View the source files, default values, and chart definition