mariadb
by [riftbit]
Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster.
About this chart
MariaDB
MariaDB is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google.
MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features.
TL;DR
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/mariadb
Introduction
This chart bootstraps a MariaDB replication cluster deployment on a Kubernetes cluster using the Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the BKPR.
Prerequisites
- Kubernetes 1.12+
- Helm 3.1.0
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name my-release:
$ helm install my-release bitnami/mariadb
The command deploys MariaDB on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Parameters
Global parameters
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker Image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.storageClass | Global storage class for dynamic provisioning | "" |
Common parameters
| Name | Description | Value |
|---|---|---|
nameOverride | String to partially override mariadb.fullname | "" |
fullnameOverride | String to fully override mariadb.fullname | "" |
clusterDomain | Default Kubernetes cluster domain | cluster.local |
commonAnnotations | Common annotations to add to all MariaDB resources (sub-charts are not considered) | {} |
commonLabels | Common labels to add to all MariaDB resources (sub-charts are not considered) | {} |
schedulerName | Name of the scheduler (other than default) to dispatch pods | "" |
extraDeploy | Array of extra objects to deploy with the release (evaluated as a template) | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the deployment | ["sleep"] |
diagnosticMode.args | Args to override all containers in the deployment | ["infinity"] |
MariaDB common parameters
| Name | Description | Value |
|---|---|---|
image.registry | MariaDB image registry | docker.io |
image.repository | MariaDB image repository | bitnami/mariadb |
image.tag | MariaDB image tag (immutable tags are recommended) | 10.5.12-debian-10-r32 |
image.pullPolicy | MariaDB image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] |
image.debug | Specify if debug logs should be enabled | false |
architecture | MariaDB architecture (standalone or replication) | standalone |
auth.rootPassword | Password for the root user. Ignored if existing secret is provided. | "" |
auth.database | Name for a custom database to create | my_database |
auth.username | Name for a custom user to create | "" |
auth.password | Password for the new user. Ignored if existing secret is provided | "" |
auth.replicationUser | MariaDB replication user | replicator |
auth.replicationPassword | MariaDB replication user password. Ignored if existing secret is provided | "" |
auth.existingSecret | Use existing secret for password details (auth.rootPassword, auth.password, auth.replicationPassword will be ignored and picked up from this secret). The secret has to contain the keys mariadb-root-password, mariadb-replication-password and mariadb-password | "" |
auth.forcePassword | Force users to specify required passwords | false |
auth.usePasswordFiles | Mount credentials as a files instead of using an environment variable | false |
auth.customPasswordFiles | Use custom password files when auth.usePasswordFiles is set to true. Define path for keys root and user, also define replicator if architecture is set to replication | {} |
initdbScripts | Dictionary of initdb scripts | {} |
initdbScriptsConfigMap | ConfigMap with the initdb scripts (Note: Overrides initdbScripts) | "" |
MariaDB Primary parameters
| Name | Description | Value |
|---|---|---|
primary.command | Override default container command on MariaDB Primary container(s) (useful when using custom images) | [] |
primary.args | Override default container args on MariaDB Primary container(s) (useful when using custom images) | [] |
primary.hostAliases | Add deployment host aliases | [] |
primary.configuration | MariaDB Primary configuration to be injected as ConfigMap | "" |
primary.existingConfiguration | Name of existing ConfigMap with MariaDB Primary configuration. | "" |
primary.updateStrategy | Update strategy type for the MariaDB primary statefulset | RollingUpdate |
primary.rollingUpdatePartition | Partition update strategy for Mariadb Primary statefulset | "" |
primary.podAnnotations | Additional pod annotations for MariaDB primary pods | {} |
primary.podAffinityPreset | MariaDB primary pod affinity preset. Ignored if primary.affinity is set. Allowed values: soft or hard | "" |
primary.podAntiAffinityPreset | MariaDB primary pod anti-affinity preset. Ignored if primary.affinity is set. Allowed values: soft or hard | soft |
primary.nodeAffinityPreset.type | MariaDB primary node affinity preset type. Ignored if primary.affinity is set. Allowed values: soft or hard | "" |
primary.nodeAffinityPreset.key | MariaDB primary node label key to match Ignored if primary.affinity is set. | "" |
primary.nodeAffinityPreset.values | MariaDB primary node label values to match. Ignored if primary.affinity is set. | [] |
primary.affinity | Affinity for MariaDB primary pods assignment | {} |
primary.nodeSelector | Node labels for MariaDB primary pods assignment |
Deploy mariadb with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mariadb on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartmariadb is pinned at v9.6.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply