-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add guide for cross-cluster backup and restore. Signed-off-by: piyush1146115 <[email protected]> * Update cross-cluster-backup and cross-namespace-backup doc. Signed-off-by: piyush1146115 <[email protected]> * Update cross-cluster-backup doc. Signed-off-by: piyush1146115 <[email protected]> * Fix grammatical errors. Signed-off-by: piyush1146115 <[email protected]> * Update cross cluster backup doc according to the review. Signed-off-by: piyush1146115 <[email protected]> * Update advance-use-case docs. Signed-off-by: piyush1146115 <[email protected]> * Fix heading. Signed-off-by: piyush1146115 <[email protected]> * Update cross cluster backup doc. Signed-off-by: piyush1146115 <[email protected]> * Fix formatting errors. Signed-off-by: piyush1146115 <[email protected]> * Fix heading. Signed-off-by: piyush1146115 <[email protected]> Co-authored-by: Emruz Hossain <[email protected]>
- Loading branch information
1 parent
6a9e850
commit 7aae0d2
Showing
13 changed files
with
790 additions
and
10 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
docs/guides/advanced-use-case/cross-cluster-backup/examples/backupconfiguration_prod.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,23 @@ | ||
apiVersion: stash.appscode.com/v1beta1 | ||
kind: BackupConfiguration | ||
metadata: | ||
name: deployment-backup | ||
namespace: demo | ||
spec: | ||
repository: | ||
name: gcs-repo | ||
schedule: "*/5 * * * *" | ||
target: | ||
ref: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: stash-demo | ||
volumeMounts: | ||
- name: source-data | ||
mountPath: /source/data | ||
paths: | ||
- /source/data | ||
retentionPolicy: | ||
name: 'keep-last-5' | ||
keepLast: 5 | ||
prune: true |
45 changes: 45 additions & 0 deletions
45
docs/guides/advanced-use-case/cross-cluster-backup/examples/deployment_prod.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,45 @@ | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: stash-sample-data | ||
namespace: demo | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
--- | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: stash-demo | ||
name: stash-demo | ||
namespace: demo | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: stash-demo | ||
template: | ||
metadata: | ||
labels: | ||
app: stash-demo | ||
name: busybox | ||
spec: | ||
containers: | ||
- args: ["echo sample_data > /source/data/data.txt && sleep 3000"] | ||
command: ["/bin/sh", "-c"] | ||
image: busybox | ||
imagePullPolicy: IfNotPresent | ||
name: busybox | ||
volumeMounts: | ||
- mountPath: /source/data | ||
name: source-data | ||
restartPolicy: Always | ||
volumes: | ||
- name: source-data | ||
persistentVolumeClaim: | ||
claimName: stash-sample-data |
46 changes: 46 additions & 0 deletions
46
docs/guides/advanced-use-case/cross-cluster-backup/examples/deployment_staging.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,46 @@ | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: stash-sample-data | ||
namespace: demo | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
--- | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: stash-recovered | ||
name: stash-recovered | ||
namespace: demo | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: stash-recovered | ||
template: | ||
metadata: | ||
labels: | ||
app: stash-recovered | ||
name: busybox | ||
spec: | ||
containers: | ||
- args: | ||
- sleep | ||
- "3600" | ||
image: busybox | ||
imagePullPolicy: IfNotPresent | ||
name: busybox | ||
volumeMounts: | ||
- mountPath: /source/data | ||
name: source-data | ||
restartPolicy: Always | ||
volumes: | ||
- name: source-data | ||
persistentVolumeClaim: | ||
claimName: demo-pvc |
11 changes: 11 additions & 0 deletions
11
docs/guides/advanced-use-case/cross-cluster-backup/examples/pvc_prod.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 @@ | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: stash-sample-data | ||
namespace: demo | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 1Gi |
12 changes: 12 additions & 0 deletions
12
docs/guides/advanced-use-case/cross-cluster-backup/examples/pvc_staging.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,12 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: demo-pvc | ||
namespace: demo | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: standard | ||
resources: | ||
requests: | ||
storage: 1Gi |
11 changes: 11 additions & 0 deletions
11
docs/guides/advanced-use-case/cross-cluster-backup/examples/repository_prod.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: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: gcs-repo | ||
namespace: demo | ||
spec: | ||
backend: | ||
gcs: | ||
bucket: stash-testing | ||
prefix: /cross-cluster/deployment/sample-deployment | ||
storageSecretName: gcs-secret |
11 changes: 11 additions & 0 deletions
11
docs/guides/advanced-use-case/cross-cluster-backup/examples/repository_staging.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: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: gcs-repo | ||
namespace: demo | ||
spec: | ||
backend: | ||
gcs: | ||
bucket: stash-testing | ||
prefix: /cross-cluster/deployment/sample-deployment | ||
storageSecretName: gcs-secret |
19 changes: 19 additions & 0 deletions
19
docs/guides/advanced-use-case/cross-cluster-backup/examples/restoresession_staging.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,19 @@ | ||
apiVersion: stash.appscode.com/v1beta1 | ||
kind: RestoreSession | ||
metadata: | ||
name: deployment-restore | ||
namespace: demo | ||
spec: | ||
repository: | ||
name: gcs-repo | ||
target: # target indicates where the recovered data will be stored | ||
ref: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: stash-recovered | ||
volumeMounts: | ||
- name: source-data | ||
mountPath: /source/data | ||
rules: | ||
- paths: | ||
- /source/data/ |
Oops, something went wrong.