Skip to content

Commit

Permalink
Add druid kubestash backup docs
Browse files Browse the repository at this point in the history
Signed-off-by: Tapajit Chandra Paul <[email protected]>
  • Loading branch information
tapojit047 committed Sep 17, 2024
1 parent 2fe7040 commit 9cb62b6
Show file tree
Hide file tree
Showing 12 changed files with 1,014 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/guides/druid/backup/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Backup & Restore Druid | KubeStash
menu:
docs_{{ .version }}:
identifier: guides-druid-backup-stashv2
name: KubeStash (aka Stash 2.0)
parent: guides-druid-backup
weight: 50
menu_name: docs_{{ .version }}
---
36 changes: 36 additions & 0 deletions docs/guides/druid/backup/logical/examples/backupconfiguration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: core.kubestash.com/v1alpha1
kind: BackupConfiguration
metadata:
name: sample-mysql-backup
namespace: demo
spec:
target:
apiGroup: kubedb.com
kind: MySQL
namespace: demo
name: sample-mysql
backends:
- name: gcs-backend
storageRef:
namespace: demo
name: gcs-storage
retentionPolicy:
name: demo-retention
namespace: demo
sessions:
- name: frequent-backup
scheduler:
schedule: "*/5 * * * *"
jobTemplate:
backoffLimit: 1
repositories:
- name: gcs-mysql-repo
backend: gcs-backend
directory: /mysql
encryptionSecret:
name: encrypt-secret
namespace: demo
addon:
name: mysql-addon
tasks:
- name: logical-backup
17 changes: 17 additions & 0 deletions docs/guides/druid/backup/logical/examples/backupstorage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: storage.kubestash.com/v1alpha1
kind: BackupStorage
metadata:
name: gcs-storage
namespace: demo
spec:
storage:
provider: gcs
gcs:
bucket: kubestash-qa
prefix: demo
secretName: gcs-secret
usagePolicy:
allowedNamespaces:
from: All
default: true
deletionPolicy: Delete
20 changes: 20 additions & 0 deletions docs/guides/druid/backup/logical/examples/restored-mysql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: kubedb.com/v1
kind: MySQL
metadata:
name: restored-mysql
namespace: demo
spec:
init:
waitForInitialRestore: true
version: "8.2.0"
replicas: 3
topology:
mode: GroupReplication
storageType: Durable
storage:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Mi
deletionPolicy: WipeOut
21 changes: 21 additions & 0 deletions docs/guides/druid/backup/logical/examples/restoresession.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: core.kubestash.com/v1alpha1
kind: RestoreSession
metadata:
name: restore-sample-mysql
namespace: demo
spec:
target:
apiGroup: kubedb.com
kind: MySQL
namespace: demo
name: restored-mysql
dataSource:
repository: gcs-mysql-repo
snapshot: latest
encryptionSecret:
name: encrypt-secret
namespace: demo
addon:
name: mysql-addon
tasks:
- name: logical-backup-restore
15 changes: 15 additions & 0 deletions docs/guides/druid/backup/logical/examples/retentionpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: storage.kubestash.com/v1alpha1
kind: RetentionPolicy
metadata:
name: demo-retention
namespace: demo
spec:
default: true
failedSnapshots:
last: 2
maxRetentionPeriod: 2mo
successfulSnapshots:
last: 5
usagePolicy:
allowedNamespaces:
from: All
18 changes: 18 additions & 0 deletions docs/guides/druid/backup/logical/examples/sample-mysql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: kubedb.com/v1
kind: MySQL
metadata:
name: sample-mysql
namespace: demo
spec:
version: "8.2.0"
replicas: 3
topology:
mode: GroupReplication
storageType: Durable
storage:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Mi
deletionPolicy: WipeOut
Loading

0 comments on commit 9cb62b6

Please sign in to comment.