Skip to content

Commit

Permalink
Add mariadb addon
Browse files Browse the repository at this point in the history
Signed-off-by: hmsayem <[email protected]>
  • Loading branch information
hmsayem committed Jan 23, 2024
1 parent ca1894c commit fc0a014
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 0 deletions.
113 changes: 113 additions & 0 deletions catalog/kubestash/raw/mariadb/mariadb-addon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
apiVersion: addons.kubestash.com/v1alpha1
kind: Addon
metadata:
name: mariadb-addon
spec:
backupTasks:
- name: logical-backup
function: mariadb-backup
driver: Restic
executor: Job
singleton: true
parameters:
- name: args
usage: Arguments to be passed to the dump command.
required: false
- name: databases
usage: List of databases to backup.
required: false
- name: enableCache
usage: Enable or disable caching. Disabling caching may impact backup performance.
required: false
default: "true"
- name: scratchDir
usage: Directory for holding temporary files and restic cache.
required: false
default: /kubestash-tmp
volumeTemplate:
- name: kubestash-tmp-volume
usage: Holds temporary files and restic cache.
source:
emptyDir: {}
volumeMounts:
- name: kubestash-tmp-volume
mountPath: /kubestash-tmp
- name: volume-snapshot
function: mariadb-csi-snapshotter
driver: VolumeSnapshotter
executor: Job
singleton: true
parameters:
- name: volumeSnapshotClassName
usage: The VolumeSnapshotClassName to be used by volumeSnapshot
required: false
- name: manifest-backup
function: kubedbmanifest-backup
driver: Restic
executor: Job
singleton: true
parameters:
- name: enableCache
usage: Enable or disable caching. Disabling caching may impact backup performance.
required: false
default: "true"
- name: scratchDir
usage: Directory for holding temporary files and restic cache.
required: false
default: /kubestash-tmp
volumeTemplate:
- name: kubestash-tmp-volume
usage: Holds temporary files and restic cache.
source:
emptyDir: { }
volumeMounts:
- name: kubestash-tmp-volume
mountPath: /kubestash-tmp
restoreTasks:
- name: logical-backup-restore
function: mariadb-restore
driver: Restic
executor: Job
singleton: true
parameters:
- name: args
usage: Arguments to be passed to the dump command.
required: false
- name: enableCache
usage: Enable or disable caching. Disabling caching may impact backup performance.
required: false
default: "true"
- name: scratchDir
usage: Directory for holding temporary files and restic cache.
required: false
default: /kubestash-tmp
volumeTemplate:
- name: kubestash-tmp-volume
usage: Holds temporary files and restic cache.
source:
emptyDir: {}
volumeMounts:
- name: kubestash-tmp-volume
mountPath: /kubestash-tmp
- name: manifest-restore
function: kubedbmanifest-restore
driver: Restic
executor: Job
singleton: true
parameters:
- name: enableCache
usage: Enable or disable caching. Disabling caching may impact backup performance.
required: false
default: "true"
- name: scratchDir
usage: Directory for holding temporary files and restic cache.
required: false
default: /kubestash-tmp
volumeTemplate:
- name: kubestash-tmp-volume
usage: Holds temporary files and restic cache.
source:
emptyDir: { }
volumeMounts:
- name: kubestash-tmp-volume
mountPath: /kubestash-tmp
16 changes: 16 additions & 0 deletions catalog/kubestash/raw/mariadb/mariadb-backup-function.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: addons.kubestash.com/v1alpha1
kind: Function
metadata:
name: mariadb-backup
spec:
args:
- backup
- --namespace=${namespace:=default}
- --backupsession=${backupSession:=}
- --enable-cache=${enableCache:=}
- --scratch-dir=${scratchDir:=}
- --wait-timeout=${waitTimeout:=300}
- --mariadb-args=${args:=}
- --db-version=${dbVersion:=}
- --databases=${databases:=}
image: ghcr.io/kubedb/mariadb-restic-plugin:v0.4.0-beta.1_${DB_VERSION}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: addons.kubestash.com/v1alpha1
kind: Function
metadata:
name: mariadb-csi-snapshotter
spec:
args:
- backup
- --namespace=${namespace:=default}
- --volume-snapshot-class-name=${volumeSnapshotClassName:=}
- --backupsession=${backupSession:=}
image: ghcr.io/kubedb/mariadb-csi-snapshotter-plugin:v0.2.0-beta.1
16 changes: 16 additions & 0 deletions catalog/kubestash/raw/mariadb/mariadb-restore-function.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: addons.kubestash.com/v1alpha1
kind: Function
metadata:
name: mariadb-restore
spec:
args:
- restore
- --namespace=${namespace:=default}
- --restoresession=${restoreSession:=}
- --snapshot=${snapshot:=}
- --enable-cache=${enableCache:=}
- --scratch-dir=${scratchDir:=}
- --wait-timeout=${waitTimeout:=300}
- --mariadb-args=${args:=}
- --db-version=${dbVersion:=}
image: ghcr.io/kubedb/mariadb-restic-plugin:v0.4.0-beta.1_${DB_VERSION}

0 comments on commit fc0a014

Please sign in to comment.