-
Notifications
You must be signed in to change notification settings - Fork 53
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: SK Ali Arman <[email protected]>
- Loading branch information
1 parent
28b7102
commit c91275e
Showing
19 changed files
with
843 additions
and
2 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,22 @@ | ||
apiVersion: storage.kubestash.com/v1alpha1 | ||
kind: BackupStorage | ||
metadata: | ||
name: local-storage | ||
namespace: demo | ||
spec: | ||
storage: | ||
provider: local | ||
local: | ||
mountPath: /md/walg | ||
persistentVolumeClaim: | ||
claimName: nfs-pvc | ||
usagePolicy: | ||
allowedNamespaces: | ||
from: All | ||
default: false | ||
deletionPolicy: WipeOut | ||
runtimeSettings: | ||
pod: | ||
securityContext: | ||
fsGroup: 999 | ||
runAsUser: 999 |
File renamed without changes.
File renamed without changes.
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,52 @@ | ||
apiVersion: archiver.kubedb.com/v1alpha1 | ||
kind: MariaDBArchiver | ||
metadata: | ||
name: mariadbarchiver-sample | ||
namespace: demo | ||
spec: | ||
pause: false | ||
databases: | ||
namespaces: | ||
from: Selector | ||
selector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: demo | ||
selector: | ||
matchLabels: | ||
archiver: "true" | ||
retentionPolicy: | ||
name: mariadb-retention-policy | ||
namespace: demo | ||
encryptionSecret: | ||
name: "encrypt-secret" | ||
namespace: "demo" | ||
fullBackup: | ||
jobTemplate: | ||
spec: | ||
securityContext: | ||
fsGroup: 999 | ||
runAsUser: 999 | ||
driver: "VolumeSnapshotter" | ||
task: | ||
params: | ||
volumeSnapshotClassName: "longhorn-snapshot-vsc" | ||
scheduler: | ||
successfulJobsHistoryLimit: 1 | ||
failedJobsHistoryLimit: 1 | ||
schedule: "*/1 * * * *" | ||
sessionHistoryLimit: 2 | ||
manifestBackup: | ||
jobTemplate: | ||
spec: | ||
securityContext: | ||
fsGroup: 999 | ||
runAsUser: 999 | ||
scheduler: | ||
successfulJobsHistoryLimit: 1 | ||
failedJobsHistoryLimit: 1 | ||
schedule: "*/1 * * * *" | ||
sessionHistoryLimit: 2 | ||
backupStorage: | ||
ref: | ||
name: "local-storage" | ||
namespace: "demo" |
File renamed without changes.
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,12 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: nfs-pvc | ||
namespace: demo | ||
spec: | ||
storageClassName: "nfs" | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
accessModes: | ||
- ReadWriteOnce |
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,51 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nfs-server | ||
namespace: demo | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: nfs-server | ||
template: | ||
metadata: | ||
labels: | ||
app: nfs-server | ||
spec: | ||
containers: | ||
- name: nfs-server | ||
image: k8s.gcr.io/volume-nfs:0.8 | ||
ports: | ||
- name: nfs | ||
containerPort: 2049 | ||
- name: mountd | ||
containerPort: 20048 | ||
- name: rpcbind | ||
containerPort: 111 | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- name: storage | ||
mountPath: /exports | ||
volumes: | ||
- name: storage | ||
hostPath: | ||
path: /data/nfs # store all data in "/data/nfs" directory of the node where it is running | ||
type: DirectoryOrCreate | ||
--- | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: nfs-server | ||
namespace: demo | ||
spec: | ||
ports: | ||
- name: nfs | ||
port: 2049 | ||
- name: mountd | ||
port: 20048 | ||
- name: rpcbind | ||
port: 111 | ||
selector: | ||
app: nfs-server # must match with the label of NFS pod |
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 @@ | ||
allowVolumeExpansion: true | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: nfs | ||
parameters: | ||
server: nfs-server.demo.svc.cluster.local | ||
share: / | ||
provisioner: nfs.csi.k8s.io | ||
reclaimPolicy: Delete | ||
volumeBindingMode: Immediate |
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 |
---|---|---|
|
@@ -6,6 +6,6 @@ metadata: | |
spec: | ||
maxRetentionPeriod: "30d" | ||
successfulSnapshots: | ||
last: 100 | ||
last: 2 | ||
failedSnapshots: | ||
last: 2 |
File renamed without changes.
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
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
docs/guides/mariadb/pitr/overview/yamls/encryptionSecret.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,8 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
type: Opaque | ||
metadata: | ||
name: encrypt-secret | ||
namespace: demo | ||
stringData: | ||
RESTIC_PASSWORD: "changeit" |
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,31 @@ | ||
apiVersion: kubedb.com/v1 | ||
kind: MariaDB | ||
metadata: | ||
name: mariadb | ||
namespace: demo | ||
labels: | ||
archiver: "true" | ||
spec: | ||
version: "11.1.3" | ||
replicas: 3 | ||
storageType: Durable | ||
storage: | ||
storageClassName: "longhorn" | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Gi | ||
archiver: | ||
ref: | ||
name: mariadbarchiver-sample | ||
namespace: demo | ||
deletionPolicy: WipeOut | ||
podTemplate: | ||
spec: | ||
containers: | ||
- name: mariadb | ||
args: | ||
- "--log-bin" | ||
- "--log-slave-updates" | ||
- "--wsrep-gtid-mode=ON" |
File renamed without changes.
34 changes: 34 additions & 0 deletions
34
docs/guides/mariadb/pitr/overview/yamls/mariadbrestore.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,34 @@ | ||
apiVersion: kubedb.com/v1 | ||
kind: MariaDB | ||
metadata: | ||
name: restore-mariadb | ||
namespace: demo | ||
spec: | ||
init: | ||
archiver: | ||
encryptionSecret: | ||
name: encrypt-secret | ||
namespace: demo | ||
fullDBRepository: | ||
name: mariadb-full | ||
namespace: demo | ||
recoveryTimestamp: "2025-09-17T05:28:26Z" | ||
version: "11.1.3" | ||
replicas: 3 | ||
storageType: Durable | ||
storage: | ||
storageClassName: "longhorn" | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Gi | ||
deletionPolicy: WipeOut | ||
podTemplate: | ||
spec: | ||
containers: | ||
- name: mariadb | ||
args: | ||
- "--log-bin" | ||
- "--log-slave-updates" | ||
- "--wsrep-gtid-mode=ON" |
11 changes: 11 additions & 0 deletions
11
docs/guides/mariadb/pitr/overview/yamls/retentionPolicy.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: storage.kubestash.com/v1alpha1 | ||
kind: RetentionPolicy | ||
metadata: | ||
name: mariadb-retention-policy | ||
namespace: demo | ||
spec: | ||
maxRetentionPeriod: "30d" | ||
successfulSnapshots: | ||
last: 2 | ||
failedSnapshots: | ||
last: 2 |
8 changes: 8 additions & 0 deletions
8
docs/guides/mariadb/pitr/overview/yamls/voluemsnapshotclass.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,8 @@ | ||
kind: VolumeSnapshotClass | ||
apiVersion: snapshot.storage.k8s.io/v1 | ||
metadata: | ||
name: longhorn-snapshot-vsc | ||
driver: driver.longhorn.io | ||
deletionPolicy: Delete | ||
parameters: | ||
type: snap |