mariadb-galera

by Helm

Helm chartv1.2.6App 10.5.12

MariaDB Galera is a multi-master database cluster solution for synchronous replication and high availability.

About this chart

mariadb-galera

MariaDB Galera is a multi-master database cluster solution for synchronous replication and high availability.

Homepage: https://github.com/appuio/charts/tree/master/appuio/mariadb-galera

Installation

helm repo add appuio https://charts.appuio.ch
helm install mariadb-galera appuio/mariadb-galera

Values

KeyTypeDefaultDescription
affinityobject{}Affinity for pod assignment
clusterDomainstring"cluster.local"Kubernetes DNS Domain name to use
configurationConfigMapstring""ConfigMap with the MariaDB configuration files (Note: Overrides mariadbConfiguration). The value is evaluated as a template.
customPasswordFilesobject{}Use custom password files when usePasswordFiles is set to true. Define path for keys root, user, and mariabackup.
db.forcePasswordboolfalseOption to force users to specify a password. That is required for 'helm upgrade' to work properly.
db.namestring"my_database"Name for new database to create
db.passwordstring""Password for the new user. Ignored if existing secret is provided.
db.userstring""Username of new user to create
diagnosticMode.argslist["infinity"]Args to override all containers in the deployment
diagnosticMode.commandlist["sleep"]Command to override all containers in the deployment
diagnosticMode.enabledboolfalseEnable diagnostic mode (all probes will be disabled and the command will be overridden)
existingSecretstring""Use existing secret for password details (rootUser.password, db.password, galera.mariabackup.password will be ignored and picked up from this secret) The secret has to contain the keys mariadb-root-password, mariadb-galera-mariabackup-password and mariadb-password.
extraContainerslist[]Additional containers (this value is evaluated as a template)
extraDeploylist[]Array of extra objects to deploy with the release (evaluated as a template)
extraEnvVarslist[]Array containing extra env vars to configure MariaDB Galera replicas
extraEnvVarsCMstring""ConfigMap containing extra env vars to configure MariaDB Galera replicas
extraEnvVarsSecretstring""Secret containing extra env vars to configure MariaDB Galera replicas
extraFlagsstring""MariaDB additional command line flags
extraInitContainerslist[]Additional init containers (this value is evaluated as a template)
extraVolumeMountslist[]Mount extra volume(s)
extraVolumeslist[]Extra volumes
forceUpdateboolfalseForce update the StatefulSet. If enabled the chart will recreate the StatefulSet without touching the Pods (cascade orphan), allowing you to update locked field, such as PVC size. Currently only changes to PVC size are supported.
forceUpdateKubectlImagestring"quay.io/bitnami/kubectl"Image used to recreate the StatefulSet. Needs to have kubectl and jq in its $PATH
fullnameOverridestring""String to fully override common.names.fullname template with a string
galera.bootstrap.bootstrapFromNodestring""Node to bootstrap from, you will need to change this parameter in case you want to bootstrap from other node
galera.bootstrap.forceSafeToBootstrapboolfalseForce safe_to_bootstrap: 1 in grastate.date file. This will set safe_to_bootstrap=1 in the node indicated by bootstrapFromNode.
galera.mariabackup.forcePasswordboolfalseOption to force users to specify a password. That is required for 'helm upgrade' to work properly.
galera.mariabackup.passwordstring""MariaBackup password. Password is ignored if existingSecret is specified.
galera.mariabackup.userstring"mariabackup"MariaBackup username
galera.namestring"galera"Galera cluster name
global.imagePullSecretslist[]Global Docker registry secret names as an array
global.imageRegistrystring""Global Docker image registry
global.storageClassstring""Global StorageClass for Persistent Volume(s)
hostAliaseslist[]Add deployment host aliases
image.debugboolfalseSpecify if debug logs should be enabled
image.pullPolicystring"IfNotPresent"MariaDB Galera image pull policy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
image.pullSecretslist[]Specify docker-registry secret names as an array
image.registrystring"docker.io"MariaDB Galera image registry
image.repositorystring"bitnami/mariadb-galera"MariaDB Galera image repository
image.tagstring"10.5.12-debian-10-r1"MariaDB Galera image tag (immutable tags are recommended)
initdbScriptsobject{}Specify dictionary of scripts to be run at first boot
initdbScriptsConfigMapstring""ConfigMap with the initdb scripts (Note: Overrides initdbScripts)
ldap.basestring""LDAP base DN
ldap.binddnstring""DAP bind DN
ldap.bindpwstring""LDAP bind password
ldap.bslookupstring""LDAP base lookup
ldap.enabledboolfalseEnable LDAP support
ldap.filterstring""LDAP custom filter
ldap.mapstring""LDAP custom map
ldap.nss_initgroups_ignoreusersstring"root,nslcd"LDAP ignored users
ldap.scopestring""LDAP search scope
ldap.tls_reqcertstring""LDAP TLS check on server certificates
ldap.uristring""LDAP URL beginning in the form `ldap
livenessProbe.enabledbooltrueTurn on and off liveness probe
livenessProbe.failureThresholdint3Minimum consecutive failures for the probe
livenessProbe.initialDelaySecondsint120Delay before liveness probe is initiated
livenessProbe.periodSecondsint10How often to perform the probe
livenessProbe.successThresholdint1consecutive successes for the probe
livenessProbe.timeoutSecondsint5When the probe times out
mariadbConfigurationstringSee values.yamlConfiguration for the MariaDB server
metrics.enabledboolfalseStart a side-car prometheus exporter
metrics.extraFlagslist[]MariaDB Prometheus exporter additional command line flags
metrics.image.pullPolicystring"IfNotPresent"MariaDB Prometheus exporter image pull policy
metrics.image.pullSecretslist[]MariaDB Prometheus exporter image pull secrets. Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
metrics.image.registrystring"docker.io"MariaDB Prometheus exporter image registry
metrics.image.repositorystring"bitnami/mysqld-exporter"MariaDB Prometheus exporter image repository
metrics.image.tagstring"0.13.0-debian-10-r75"MariaDB Prometheus exporter image tag (immutable tags are recommended)
metrics.prometheusRules.enabledboolfalseif true, creates a Prometheus Operator PrometheusRule (also requires metrics.enabled to be true, and makes little sense without ServiceMonitor)
metrics.prometheusRules.rulesobject{}PrometheusRule rules to configure
metrics.prometheusRules.selectorobject{"app":"prometheus-operator","release":"prometheus"}[object] Additional labels to add to the PrometheusRule so it is picked up by the operator If using the Helm Chart this is the name of the Helm release and 'app: prometheus-operator'
metrics.resources.limitsobject{}The resources limits for the container
metrics.resources.requestsobject{}The requested resources for the container
metrics.service.annotationsobject{"prometheus.io/port":"9104","prometheus.io/scrape":"true"}Prometheus exporter service annotations
metrics.service.portint9104Prometheus exporter service port
metrics.service.typestring"ClusterIP"Prometheus exporter service type
metrics.serviceMonitor.enabledboolfalseif true, creates a Prometheus Operator ServiceMonitor (also requires metrics.enabled to be true)
metrics.serviceMonitor.intervalstring""How frequently to scrape metrics (use by default, falling back to Prometheus' default)
metrics.serviceMonitor.metricRelabelingslist[]MetricRelabelConfigs to apply to samples before ingestion
metrics.serviceMonitor.namespacestring""Optional namespace which Prometheus is running in
metrics.serviceMonitor.relabelingslist[]RelabelConfigs to apply to samples before scraping
metrics.serviceMonitor.scrapeTimeoutstring""Timeout after which the scrape is ended
metrics.serviceMonitor.selectorobject{"prometheus":"kube-prometheus"}ServiceMonitor selector labels. Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install.
nameOverridestring""String to partially override common.names.fullname template with a string (will prepend the release name)
nodeAffinityPreset.keystring""Node label key to match. Ignored if affinity is set.
nodeAffinityPreset.typestring""Node affinity preset type. Ignored if affinity is set. Allowed values: soft or hard
nodeAffinityPreset.valueslist[]Node label values to match. Ignored if affinity is set.
nodeSelectorobject{}Node labels for pod assignment
persistence.accessModeslist["ReadWriteOnce"]Persistent Volume Access Modes
persistence.annotationsobject{}Persistent Volume Claim annotations
persistence.enabledbooltrueEnable persistence using PVC
persistence.existingClaimstring""Provide an existing PersistentVolumeClaim
persistence.mountPathstring"/bitnami/mariadb"Path to mount the volume at
persistence.selectorobject{}Selector to match an existing Persistent Volume (this value is evaluated as a template)
persistence.sizestring"8Gi"Persistent Volume Size
persistence.storageClassstring""Persistent Volume Storage Class
persistence.subPathstring""Subdirectory of the volume to mount
podAffinityPresetstring""Pod affinity preset. Ignored if affinity is set. Allowed values: soft or hard
podAnnotationsobject{}Annotations for MariaDB Galera pods
podAntiAffinityPresetstring"soft"Pod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hard
podDisruptionBudget.createboolfalseSpecifies whether a Pod disruption budget should be created
podDisruptionBudget.maxUnavailablestring""Maximum number / percentage of pods that may be made unavailable
podDisruptionBudget.minAvailableint1Minimum number / percentage of pods that should remain scheduled
podLabelsobject{}Extra labels for MariaDB Galera pods
podManagementPolicystring"OrderedReady"StatefulSet controller supports relax its ordering guarantees while preserving its uniqueness and identity guarantees. There are two valid pod management policies: OrderedReady and Parallel
priorityClassNamestring""Priority Class Name for Statefulset
rbac.createboolfalseSpecify whether RBAC resources should be created and used
readinessProbe.enabledbooltrueTurn on and off readiness probe
readinessProbe.failureThresholdint3Minimum consecutive failures for the probe
readinessProbe.initialDelaySecondsint30Delay before readiness probe is initiated
readinessProbe.periodSecondsint10How often to perform the probe
readinessProbe.successThresholdint1Minimum consecutive successes for the probe
readinessProbe.timeoutSecondsint5When the probe times out
replicaCountint3Desired number of cluster nodes
resources.limitsobject{}The resources limits for the container
resources.requestsobject{}The requested resources for the container
rootUser.forcePasswordboolfalseOption to force users to specify a password. That is required for 'helm upgrade' to work properly. If it is not force, a random password will be generated.
rootUser.passwordstring""Password for the admin user. Ignored if existing secret is provided. Password is ignored if existingSecret is specified.
rootUser.userstring"root"Username for the admin user.
schedulerNamestring""Name of the Kubernetes scheduler (other than default)
securityContext.enabledbooltrueEnable security context
securityContext.fsGroupint1001Group ID for the container filesystem
securityContext.runAsUserint1001User ID for the container
service.annotationsobject{}Additional annotations for MariaDB Galera service
service.clusterIPstring""Specific cluster IP when service type is cluster IP. Use None for headless service
service.externalIPslist[]External IP list to use with ClusterIP service type
service.headless.annotationsobject{}Annotations for the headless service. May be useful for setting `serv

Deploy mariadb-galera with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mariadb-galera 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-galera is pinned at v1.2.6 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