Skip to content

Commit d7d05cf

Browse files
Merge branch 'main' into K8SPSMDB-1491-incremental
2 parents 43b616d + 1a6adeb commit d7d05cf

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: psmdb.percona.com/v1
2+
kind: PerconaServerMongoDBRestore
3+
metadata:
4+
name:
5+
spec:
6+
clusterName: some-name
7+
storageName:
8+
backupSource:
9+
type: physical
10+
destination: s3://BACKUP-NAME
11+
minio:
12+
credentialsSecret: minio-secret
13+
region: us-east-1
14+
bucket: operator-testing
15+
endpointUrl: minio-service:9000
16+
insecureSkipTLSVerify: false
17+
secure: false

e2e-tests/demand-backup-physical-minio-native/run

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ backup_dest_minio=$(get_backup_dest "${backup_name_minio}")
5252
run_restore ${backup_name_minio}
5353
run_recovery_check ${backup_name_minio} "" "" "true"
5454

55+
echo 'Drop collection'
56+
run_mongo_tls 'use myApp\n db.test.drop()' "myApp:myPass@${cluster}-rs0.${namespace}"
57+
echo 'check backup and restore using backupSource -- minio'
58+
backup_dest_minio=$(get_backup_dest "${backup_name_minio}")
59+
run_restore_backupsource "${backup_name_minio}-source" "${backup_dest_minio}" ""
60+
run_recovery_check "${backup_name_minio}-source" "" "" "true"
61+
5562
desc 'Testing with arbiter and non-voting nodes'
5663

5764
apply_cluster "${test_dir}/conf/${cluster}-arbiter-nv.yml"

pkg/apis/psmdb/v1/perconaservermongodbrestore_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ func (r *PerconaServerMongoDBRestore) CheckFields() error {
123123
r.Spec.BackupSource.S3 == nil &&
124124
r.Spec.BackupSource.GCS == nil &&
125125
r.Spec.BackupSource.Azure == nil &&
126+
r.Spec.BackupSource.Minio == nil &&
126127
r.Spec.BackupSource.Filesystem == nil {
127-
return errors.New("one of storageName, backupSource.s3, backupSource.gcs, backupSource.azure or backupSource.filesystem is required")
128+
return errors.New("one of storageName, backupSource.minio, backupSource.s3, backupSource.gcs, backupSource.azure or backupSource.filesystem is required")
128129
}
129130
}
130131

pkg/controller/perconaservermongodbrestore/psmdb_restore_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ func (r *ReconcilePerconaServerMongoDBRestore) getBackup(ctx context.Context, cr
334334
Destination: cr.Spec.BackupSource.Destination,
335335
StorageName: cr.Spec.StorageName,
336336
S3: cr.Spec.BackupSource.S3,
337+
Minio: cr.Spec.BackupSource.Minio,
337338
GCS: cr.Spec.BackupSource.GCS,
338339
Azure: cr.Spec.BackupSource.Azure,
339340
Filesystem: cr.Spec.BackupSource.Filesystem,

0 commit comments

Comments
 (0)