573ac49939
Below enhancements are made to Mariadb backup: 1) Used new helm-toolkit function to send/retrieve Mariadb backups to/from RGW via OpenStack Swift API. 2) Modified the backup script such that the database backup tarball can be sent to RGW. 3) Added a keystone user for RGW access. 4) Added a secret for OpenStack Swift API access. 5) Changed the cronjob image and runAsUser 6) Modified the restore script so that archives stored remotely on RGW can be used for the restore data source. 7) Added functions to the restore script to retrieve data from an archive for tables, table rows and table schema of a databse 8) Added a secret containing all the backup/restore related configuration needed for invoking the backup/restore operation from a different application or namespace. Change-Id: Iadb9438fe419cded374897b43337039609077e61
28 lines
1.1 KiB
YAML
28 lines
1.1 KiB
YAML
{{/*
|
|
This manifest results a secret being created which has the key information
|
|
needed for backing up and restoring the Mariadb databases.
|
|
*/}}
|
|
|
|
{{- if and .Values.conf.backup.enabled .Values.manifests.secret_backup_restore }}
|
|
|
|
{{- $envAll := . }}
|
|
{{- $userClass := "backup_restore" }}
|
|
{{- $secretName := index $envAll.Values.secrets.mariadb $userClass }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ $secretName }}
|
|
type: Opaque
|
|
data:
|
|
BACKUP_ENABLED: {{ $envAll.Values.conf.backup.enabled | quote | b64enc }}
|
|
BACKUP_BASE_PATH: {{ $envAll.Values.conf.backup.base_path | b64enc }}
|
|
LOCAL_DAYS_TO_KEEP: {{ $envAll.Values.conf.backup.days_to_keep | quote | b64enc }}
|
|
MYSQLDUMP_OPTIONS: {{ $envAll.Values.conf.backup.mysqldump_options | b64enc }}
|
|
REMOTE_BACKUP_ENABLED: {{ $envAll.Values.conf.backup.remote_backup.enabled | quote | b64enc }}
|
|
REMOTE_BACKUP_CONTAINER: {{ $envAll.Values.conf.backup.remote_backup.container_name | b64enc }}
|
|
REMOTE_BACKUP_DAYS_TO_KEEP: {{ $envAll.Values.conf.backup.remote_backup.days_to_keep | quote | b64enc }}
|
|
REMOTE_BACKUP_STORAGE_POLICY: {{ $envAll.Values.conf.backup.remote_backup.storage_policy | b64enc }}
|
|
...
|
|
{{- end }}
|