mariadb

by joaquinito2051

Helm chartv6.1.0App 10.3.15

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 install <helm-repo>/mariadb

$ helm install stable/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.10+
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release <helm-repo>/mariadb

$ helm install --name my-release stable/mariadb The command deploys MariaDB on the Kubernetes cluster in the default configuration. The configuration 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.

Configuration

The following table lists the configurable parameters of the MariaDB chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
image.registryMariaDB image registrydocker.io
image.repositoryMariaDB Image namebitnami/mariadb
image.tagMariaDB Image tag{VERSION}
image.pullPolicyMariaDB image pull policyAlways if imageTag is latest, else IfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
image.debugSpecify if debug logs should be enabledfalse
service.typeKubernetes service typeClusterIP
service.clusterIpSpecific cluster IP when service type is cluster IP. Use None for headless servicenil
service.portMySQL service port3306
serviceAccount.createSpecifies whether a ServiceAccount should be createdfalse
serviceAccount.nameThe name of the ServiceAccount to createGenerated using the mariadb.fullname template
rbac.createCreate and use RBAC resourcesfalse
securityContext.enabledEnable security contexttrue
securityContext.fsGroupGroup ID for the container1001
securityContext.runAsUserUser ID for the container1001
existingSecretUse Existing secret for Password details (rootUser.password, db.password, replication.password will be ignored and picked up from this secret)
rootUser.passwordPassword for the root user. Ignored if existing secret is provided.random 10 character alphanumeric string
rootUser.forcePasswordForce users to specify a passwordfalse
db.userUsername of new user to createnil
db.passwordPassword for the new user. Ignored if existing secret is provided.random 10 character alphanumeric string if db.user is defined
db.nameName for new database to createmy_database
replication.enabledMariaDB replication enabledtrue
replication.userMariaDB replication userreplicator
replication.passwordMariaDB replication user password. Ignored if existing secret is provided.random 10 character alphanumeric string
initdbScriptsDictionary of initdb scriptsnil
initdbScriptsConfigMapConfigMap with the initdb scripts (Note: Overrides initdbScripts)nil
master.annotations[].keykey for the the annotation list itemnil
master.annotations[].valuevalue for the the annotation list itemnil
master.affinityMaster affinity (in addition to master.antiAffinity when set){}
master.antiAffinityMaster pod anti-affinity policysoft
master.nodeSelectorMaster node labels for pod assignment{}
master.tolerationsList of node taints to tolerate (master)[]
master.updateStrategyMaster statefulset update strategy policyRollingUpdate
master.persistence.enabledEnable persistence using PVCtrue
master.persistence.existingClaimProvide an existing PersistentVolumeClaimnil
master.persistence.mountPathPath to mount the volume at/bitnami/mariadb
master.persistence.annotationsPersistent Volume Claim annotations{}
master.persistence.storageClassPersistent Volume Storage Class``
master.persistence.accessModesPersistent Volume Access Modes[ReadWriteOnce]
master.persistence.sizePersistent Volume Size8Gi
master.extraInitContainersAdditional init containers as a string to be passed to the tpl function (master)
master.configConfig file for the MariaDB Master server_default values in the values.yaml file_
master.resourcesCPU/Memory resource requests/limits for master node{}
master.livenessProbe.enabledTurn on and off liveness probe (master)true
master.livenessProbe.initialDelaySecondsDelay before liveness probe is initiated (master)120
master.livenessProbe.periodSecondsHow often to perform the probe (master)10
master.livenessProbe.timeoutSecondsWhen the probe times out (master)1
master.livenessProbe.successThresholdMinimum consecutive successes for the probe (master)1
master.livenessProbe.failureThresholdMinimum consecutive failures for the probe (master)3
master.readinessProbe.enabledTurn on and off readiness probe (master)true
master.readinessProbe.initialDelaySecondsDelay before readiness probe is initiated (master)30
master.readinessProbe.periodSecondsHow often to perform the probe (master)10
master.readinessProbe.timeoutSecondsWhen the probe times out (master)1
master.readinessProbe.successThresholdMinimum consecutive successes for the probe (master)1
master.readinessProbe.failureThresholdMinimum consecutive failures for the probe (master)3
master.podDisruptionBudget.enabledIf true, create a pod disruption budget for master pods.false
master.podDisruptionBudget.minAvailableMinimum number / percentage of pods that should remain scheduled1
master.podDisruptionBudget.maxUnavailableMaximum number / percentage of pods that may be made unavailablenil
slave.replicasDesired number of slave replicas1
slave.annotations[].keykey for the the annotation list itemnil
slave.annotations[].valuevalue for the the annotation list itemnil
slave.affinitySlave affinity (in addition to slave.antiAffinity when set){}
slave.antiAffinitySlave pod anti-affinity policysoft
slave.nodeSelectorSlave node labels for pod assignment{}
slave.tolerationsList of node taints to tolerate for (slave)[]
slave.updateStrategySlave statefulset update strategy policyRollingUpdate
slave.persistence.enabledEnable persistence using a PersistentVolumeClaimtrue
slave.persistence.annotationsPersistent Volume Claim annotations{}

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmariadb is pinned at v6.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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