-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adjust backup e2e test cases (#5604)
- Loading branch information
1 parent
0bc5411
commit 0470c13
Showing
23 changed files
with
268 additions
and
173 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
10 changes: 0 additions & 10 deletions
10
test/e2e/testdata/smoketest/mongodb/09_backup_snapshot.yaml
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
test/e2e/testdata/smoketest/mongodb/09_backup_volume_snapshot.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,13 @@ | ||
apiVersion: dataprotection.kubeblocks.io/v1alpha1 | ||
kind: Backup | ||
metadata: | ||
name: backup-mongodb-cluster-snapshot | ||
spec: | ||
backupPolicyName: mongodb-cluster-mongodb-backup-policy | ||
retentionPeriod: 7d | ||
backupMethod: volume-snapshot | ||
deletionPolicy: Delete | ||
status: | ||
duration: 60s | ||
backupRepoName: my-repo | ||
phase: Completed |
30 changes: 30 additions & 0 deletions
30
test/e2e/testdata/smoketest/mongodb/10_backup_volume_snapshot_restore.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,30 @@ | ||
--- | ||
# Source: mongodb-cluster/templates/replicaset.yaml | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: Cluster | ||
metadata: | ||
name: mongo-cluster-snapshot | ||
annotations: | ||
kubeblocks.io/restore-from-backup: '{"mongodb":{"name":"backup-mongodb-cluster-snapshot","namespace":"default","managementPolicy":"Parallel"}}' | ||
spec: | ||
clusterDefinitionRef: mongodb | ||
clusterVersionRef: mongodb-5.0 | ||
terminationPolicy: Halt | ||
affinity: | ||
topologyKeys: | ||
- kubernetes.io/hostname | ||
componentSpecs: | ||
- name: mongodb | ||
componentDefRef: mongodb | ||
monitor: false | ||
replicas: 3 | ||
serviceAccountName: kb-mongodb-cluster | ||
volumeClaimTemplates: | ||
- name: data # ref clusterdefinition components.containers.volumeMounts.name | ||
spec: | ||
storageClassName: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 21Gi |
13 changes: 13 additions & 0 deletions
13
test/e2e/testdata/smoketest/mongodb/11_backup_datafile.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,13 @@ | ||
apiVersion: dataprotection.kubeblocks.io/v1alpha1 | ||
kind: Backup | ||
metadata: | ||
name: backup-mongodb-cluster | ||
spec: | ||
backupPolicyName: mongodb-cluster-mongodb-backup-policy | ||
retentionPeriod: 7d | ||
backupMethod: datafile | ||
deletionPolicy: Delete | ||
status: | ||
duration: 60s | ||
backupRepoName: my-repo | ||
phase: Completed |
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
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
13 changes: 13 additions & 0 deletions
13
test/e2e/testdata/smoketest/postgresql/11_backup_basebackup.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,13 @@ | ||
apiVersion: dataprotection.kubeblocks.io/v1alpha1 | ||
kind: Backup | ||
metadata: | ||
name: backup-postgresql-cluster | ||
spec: | ||
backupPolicyName: pg-cluster-postgresql-backup-policy | ||
retentionPeriod: 7d | ||
backupMethod: pg-basebackup | ||
deletionPolicy: Delete | ||
status: | ||
duration: 60s | ||
backupRepoName: my-repo | ||
phase: Completed |
10 changes: 0 additions & 10 deletions
10
test/e2e/testdata/smoketest/postgresql/11_backup_snapshot.yaml
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
test/e2e/testdata/smoketest/postgresql/12_backup_basebackup_restore.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,26 @@ | ||
--- | ||
# Source: postgresql-cluster/templates/cluster.yaml | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: Cluster | ||
metadata: | ||
name: pg-cluster-snapshot | ||
annotations: | ||
kubeblocks.io/restore-from-backup: '{"postgresql":{"name":"backup-postgresql-cluster","namespace":"default","managementPolicy":"Parallel"}}' | ||
spec: | ||
clusterDefinitionRef: postgresql | ||
clusterVersionRef: postgresql-14.7.2-latest | ||
terminationPolicy: WipeOut | ||
componentSpecs: | ||
- name: postgresql | ||
componentDefRef: postgresql | ||
serviceAccountName: kb-mycluster-pgcluster | ||
monitor: false | ||
replicas: 1 | ||
volumeClaimTemplates: | ||
- name: data | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 21Gi |
112 changes: 0 additions & 112 deletions
112
test/e2e/testdata/smoketest/postgresql/12_backup_snapshot_restore.yaml
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
test/e2e/testdata/smoketest/postgresql/13_backup_volume_snapshot.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,13 @@ | ||
apiVersion: dataprotection.kubeblocks.io/v1alpha1 | ||
kind: Backup | ||
metadata: | ||
name: backup-postgresql-cluster-snapshot | ||
spec: | ||
backupPolicyName: pg-cluster-postgresql-backup-policy | ||
retentionPeriod: 7d | ||
backupMethod: volume-snapshot | ||
deletionPolicy: Delete | ||
status: | ||
duration: 60s | ||
backupRepoName: my-repo | ||
phase: Completed |
26 changes: 26 additions & 0 deletions
26
test/e2e/testdata/smoketest/postgresql/14_backup_volume_snapshot_restore.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,26 @@ | ||
--- | ||
# Source: postgresql-cluster/templates/cluster.yaml | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: Cluster | ||
metadata: | ||
name: pg-cluster-snapshot | ||
annotations: | ||
kubeblocks.io/restore-from-backup: '{"postgresql":{"name":"backup-postgresql-cluster-snapshot","namespace":"default","managementPolicy":"Parallel"}}' | ||
spec: | ||
clusterDefinitionRef: postgresql | ||
clusterVersionRef: postgresql-14.7.2-latest | ||
terminationPolicy: WipeOut | ||
componentSpecs: | ||
- name: postgresql | ||
componentDefRef: postgresql | ||
serviceAccountName: kb-mycluster-pgcluster | ||
monitor: false | ||
replicas: 1 | ||
volumeClaimTemplates: | ||
- name: data | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 21Gi |
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
test/e2e/testdata/smoketest/redis/09_backup_volume_snapshot.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,13 @@ | ||
apiVersion: dataprotection.kubeblocks.io/v1alpha1 | ||
kind: Backup | ||
metadata: | ||
name: backup-redis-cluster-snapshot | ||
spec: | ||
backupPolicyName: redis-cluster-redis-backup-policy | ||
retentionPeriod: 7d | ||
backupMethod: volume-snapshot | ||
deletionPolicy: Delete | ||
status: | ||
duration: 60s | ||
backupRepoName: my-repo | ||
phase: Completed |
Oops, something went wrong.