Using the mariadb-operator version 0.24.0 a backup to
S3 storages is supported and implemented in the
templates and mariadb chart
Add a missing mariadbOperator config for mariadb-init
Issue-ID: OOM-3264
Change-Id: I065053832c226740b2a3b64b065cecc599f28296
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
============== =========== ======= ======== ======== ============= ========
Release Kubernetes Helm kubectl Docker Cert-Manager Strimzi
============== =========== ======= ======== ======== ============= ========
============== =========== ======= ======== ======== ============= ========
Release Kubernetes Helm kubectl Docker Cert-Manager Strimzi
============== =========== ======= ======== ======== ============= ========
- Kohn 1.23.8 3.8.2 1.23.8 20.10.x 1.8.0 0.32.0
London 1.23.8 3.8.2 1.23.x 20.10.x 1.12.2 0.35.0
Montreal 1.27.5 3.12.3 1.27.x 20.10.x 1.13.2 0.36.1
London 1.23.8 3.8.2 1.23.x 20.10.x 1.12.2 0.35.0
Montreal 1.27.5 3.12.3 1.27.x 20.10.x 1.13.2 0.36.1
+ New Delhi 1.27.5 3.12.3 1.27.x 20.10.x 1.13.2 0.36.3
============== =========== ======= ======== ======== ============= ========
.. table:: OOM Software Requirements (production)
============== =========== ======= ======== ======== ============= ========
.. table:: OOM Software Requirements (production)
============== ====== ============ ==============
London 1.17.2 v0.6.2 19.0.3-legacy
Montreal 1.19.3 v1.0.0 19.0.3-legacy
============== ====== ============ ==============
London 1.17.2 v0.6.2 19.0.3-legacy
Montreal 1.19.3 v1.0.0 19.0.3-legacy
+ New Delhi 1.19.3 v1.0.0 19.0.3-legacy
============== ====== ============ ==============
.. table:: OOM Software Requirements (optional)
============== ====== ============ ==============
.. table:: OOM Software Requirements (optional)
============== ================= ========== =================
Release Prometheus Stack K8ssandra MariaDB-Operator
============== ================= ========== =================
============== ================= ========== =================
Release Prometheus Stack K8ssandra MariaDB-Operator
============== ================= ========== =================
London 45.x 1.6.1
Montreal 45.x 1.10.2 0.23.1
London 45.x 1.6.1
Montreal 45.x 1.10.2 0.23.1
+ New Delhi 45.x 1.11.0 0.24.0
============== ================= ========== =================
============== ================= ========== =================
apiVersion: v2
description: Common templates for inclusion in other charts
name: common
apiVersion: v2
description: Common templates for inclusion in other charts
name: common
{{- index .Values "mariadb-galera" "nameOverride" -}}
{{- end }}
{{- else -}}
{{- index .Values "mariadb-galera" "nameOverride" -}}
{{- end }}
{{- else -}}
- {{- if and .Values.global.mariadbGalera.useOperator }}
+ {{- if .Values.global.mariadbGalera.useOperator }}
{{- printf "%s-primary" (.Values.global.mariadbGalera.service) }}
{{- else }}
{{- .Values.global.mariadbGalera.service -}}
{{- printf "%s-primary" (.Values.global.mariadbGalera.service) }}
{{- else }}
{{- .Values.global.mariadbGalera.service -}}
{{- define "common.mariadbOpBackup" -}}
{{- $dot := default . .dot -}}
{{- $dbinst := include "common.name" $dot -}}
{{- define "common.mariadbOpBackup" -}}
{{- $dot := default . .dot -}}
{{- $dbinst := include "common.name" $dot -}}
+{{- $name := default $dbinst $dot.Values.backup.nameOverride -}}
+---
+apiVersion: mariadb.mmontes.io/v1alpha1
spec:
mariaDbRef:
name: {{ $dbinst }}
schedule:
spec:
mariaDbRef:
name: {{ $dbinst }}
schedule:
+ cron: {{ $dot.Values.backup.cron }}
+ maxRetention: {{ $dot.Values.backup.maxRetention }}
+ {{- if eq $dot.Values.backup.storageType "PVC" }}
persistentVolumeClaim:
resources:
requests:
persistentVolumeClaim:
resources:
requests:
- storage: 100Mi
- {{- if .Values.mariadbOperator.storageClassName }}
- storageClassName: {{ .Values.mariadbOperator.storageClassName }}
+ storage: {{ $dot.Values.backup.persistence.size }}
+ {{- if $dot.Values.mariadbOperator.storageClassName }}
+ storageClassName: {{ $dot.Values.mariadbOperator.storageClassName }}
+ - {{ $dot.Values.backup.persistence.accessMode }}
+ {{- end }}
+ {{- if eq $dot.Values.backup.storageType "S3" }}
+ s3: {{- include "common.tplValue" ( dict "value" .Values.backup.s3 "context" $) | nindent 6 }}
+ {{- end }}
+ {{- if eq $dot.Values.backup.storageType "volume" }}
+ volume: {{- include "common.tplValue" ( dict "value" .Values.backup.volume "context" $) | nindent 6 }}
+ {{- end }}
resources:
requests:
cpu: 100m
resources:
requests:
cpu: 100m
initialDelaySeconds: 20
periodSeconds: 10
timeoutSeconds: 5
initialDelaySeconds: 20
periodSeconds: 10
timeoutSeconds: 5
+ {{- if default false .Values.global.metrics.enabled }}
+ metrics:
+ enabled: true
+ {{- end }}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
maxUnavailable: 50%
updateStrategy:
type: RollingUpdate
maxUnavailable: 50%
updateStrategy:
type: RollingUpdate
- #myCnf: |
- # [mysqld]
- # bind-address=0.0.0.0
- # default_storage_engine=InnoDB
- # binlog_format=row
- # innodb_autoinc_lock_mode=2
- # max_allowed_packet=256M
- # lower_case_table_names = 1
-
- # ## Character set
- # collation_server=utf8_unicode_ci
- # init_connect='SET NAMES utf8'
- # character_set_server=utf8
myCnfConfigMapKeyRef:
key: my.cnf
myCnfConfigMapKeyRef:
key: my.cnf
apiVersion: v2
description: Chart for MariaDB Galera cluster
name: mariadb-galera
apiVersion: v2
description: Chart for MariaDB Galera cluster
name: mariadb-galera
keywords:
- mariadb
- mysql
keywords:
- mariadb
- mysql
## For this reason the db data pvc needs to have accessMode: ReadWriteMany.
backup:
enabled: false
## For this reason the db data pvc needs to have accessMode: ReadWriteMany.
backup:
enabled: false
+ # used in the mariadb-operator to override the backup name (default is DBName)
+ # nameOverride:
+ # defines the backup job execution period
+ # used by mariadb-operator to set the max retention time
+ maxRetention: 720h
+ # used by mariadb-operator to set the backup storage type (PVC, S3, volume)
+ storageType: PVC
+ # configuration used for PVC backup storage
persistence:
## If true, use a Persistent Volume Claim, If false, use emptyDir
##
persistence:
## If true, use a Persistent Volume Claim, If false, use emptyDir
##
## Persistent Volume size
##
size: 2Gi
## Persistent Volume size
##
size: 2Gi
+ # requires mariadb-operator v0.24.0
+ # configuration used for S3 backup storage
+ # see: https://github.com/mariadb-operator/mariadb-operator/blob/main/docs/BACKUP.md
+ s3:
+ bucket: backups
+ endpoint: minio.minio.svc.cluster.local:9000
+ #region: us-east-1
+ accessKeyIdSecretKeyRef:
+ name: minio
+ key: access-key-id
+ secretAccessKeySecretKeyRef:
+ name: minio
+ key: secret-access-key
+ tls:
+ enabled: false
+ caSecretKeyRef:
+ name: minio-ca
+ key: ca.crt
+ # configuration used for kubernetes volumes as backup storage
+ # see: https://github.com/mariadb-operator/mariadb-operator/blob/main/docs/BACKUP.md
+ volume: {}
readinessCheck:
wait_for:
readinessCheck:
wait_for:
service:
internalPort: 3306
nameOverride: mariadb-galera
service:
internalPort: 3306
nameOverride: mariadb-galera
+ mariadbOperator:
+ galera:
+ enabled: false
config:
userPassword: Ci@shsOd3pky1Vji
config:
userPassword: Ci@shsOd3pky1Vji