-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: hmsayem <[email protected]>
- Loading branch information
Showing
4 changed files
with
156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
16
catalog/kubestash/raw/mariadb/mariadb-backup-function.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
11 changes: 11 additions & 0 deletions
11
catalog/kubestash/raw/mariadb/mariadb-csi-snapshotter-function.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
16
catalog/kubestash/raw/mariadb/mariadb-restore-function.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |