-
Notifications
You must be signed in to change notification settings - Fork 157
K8SPSMDB-1425: Add pitr-to-new-cluster e2e test #2070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
egegunes
wants to merge
7
commits into
main
Choose a base branch
from
K8SPSMDB-1425-e2e
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+505
−19
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e5bc64b
K8SPSMDB-1425: Add pitr-to-new-cluster e2e test
egegunes 33a690d
fix test
egegunes 252b9c8
Merge branch 'main' into K8SPSMDB-1425-e2e
hors e61b7da
fix triggering resync after restore
egegunes 8bc026e
increase retries for backup validation
egegunes bcc94f7
improve test
egegunes b7c9eaf
Merge branch 'main' into K8SPSMDB-1425-e2e
egegunes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,6 @@ | ||
switched to db myApp | ||
{ "_id" : , "x" : 100500 } | ||
{ "_id" : , "x" : 100501 } | ||
{ "_id" : , "x" : 100502 } | ||
{ "_id" : , "x" : 100503 } | ||
bye |
This file contains hidden or 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,10 @@ | ||
switched to db myApp | ||
{ "_id" : , "x" : 100500 } | ||
{ "_id" : , "x" : 100501 } | ||
{ "_id" : , "x" : 100502 } | ||
{ "_id" : , "x" : 100503 } | ||
{ "_id" : , "x" : 100504 } | ||
{ "_id" : , "x" : 100505 } | ||
{ "_id" : , "x" : 100506 } | ||
{ "_id" : , "x" : 100507 } | ||
bye |
This file contains hidden or 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,3 @@ | ||
switched to db myApp | ||
{ "_id" : , "x" : 100500 } | ||
bye |
21 changes: 21 additions & 0 deletions
21
e2e-tests/pitr-to-new-cluster/compare/pbm_config_source.yml
This file contains hidden or 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,21 @@ | ||
storage: | ||
type: s3 | ||
s3: | ||
region: us-east-1 | ||
endpointUrl: http://minio-service:9000/ | ||
forcePathStyle: true | ||
bucket: operator-testing | ||
prefix: some-name-source | ||
credentials: | ||
access-key-id: '***' | ||
secret-access-key: '***' | ||
maxUploadParts: 10000 | ||
storageClass: STANDARD | ||
insecureSkipTLSVerify: false | ||
pitr: | ||
enabled: false | ||
compression: s2 | ||
backup: | ||
oplogSpanMin: 0 | ||
compression: s2 | ||
restore: {} |
21 changes: 21 additions & 0 deletions
21
e2e-tests/pitr-to-new-cluster/compare/pbm_config_target.yml
This file contains hidden or 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,21 @@ | ||
storage: | ||
type: s3 | ||
s3: | ||
region: us-east-1 | ||
endpointUrl: http://minio-service:9000/ | ||
forcePathStyle: true | ||
bucket: operator-testing | ||
prefix: some-name-target | ||
credentials: | ||
access-key-id: '***' | ||
secret-access-key: '***' | ||
maxUploadParts: 10000 | ||
storageClass: STANDARD | ||
insecureSkipTLSVerify: false | ||
pitr: | ||
enabled: false | ||
compression: s2 | ||
backup: | ||
oplogSpanMin: 0 | ||
compression: s2 | ||
restore: {} |
This file contains hidden or 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: psmdb.percona.com/v1 | ||
kind: PerconaServerMongoDBBackup | ||
metadata: | ||
name: | ||
spec: | ||
clusterName: | ||
storageName: minio | ||
type: |
19 changes: 19 additions & 0 deletions
19
e2e-tests/pitr-to-new-cluster/conf/restore-backupsource.yml
This file contains hidden or 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: psmdb.percona.com/v1 | ||
kind: PerconaServerMongoDBRestore | ||
metadata: | ||
name: | ||
spec: | ||
clusterName: | ||
pitr: | ||
pitrType: latest | ||
backupSource: | ||
type: | ||
destination: s3://DESTINATION | ||
s3: | ||
credentialsSecret: minio-secret | ||
bucket: operator-testing | ||
prefix: some-name-source | ||
endpointUrl: http://minio-service:9000/ | ||
region: us-east-1 | ||
insecureSkipTLSVerify: false | ||
|
This file contains hidden or 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,10 @@ | ||
apiVersion: psmdb.percona.com/v1 | ||
kind: PerconaServerMongoDBRestore | ||
metadata: | ||
name: restore-target-backup-minio-logical | ||
spec: | ||
clusterName: some-name-target | ||
backupName: target-backup-minio-logical | ||
pitr: | ||
type: date | ||
date: |
This file contains hidden or 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,64 @@ | ||
apiVersion: psmdb.percona.com/v1 | ||
kind: PerconaServerMongoDB | ||
metadata: | ||
name: some-name-source | ||
spec: | ||
#platform: openshift | ||
image: | ||
imagePullPolicy: Always | ||
backup: | ||
enabled: true | ||
image: perconalab/percona-server-mongodb-operator:main-backup | ||
storages: | ||
minio: | ||
type: s3 | ||
s3: | ||
credentialsSecret: minio-secret | ||
region: us-east-1 | ||
bucket: operator-testing | ||
prefix: some-name-source | ||
endpointUrl: http://minio-service:9000/ | ||
insecureSkipTLSVerify: false | ||
pitr: | ||
enabled: true | ||
oplogSpanMin: 1 | ||
sharding: | ||
enabled: false | ||
replsets: | ||
- name: rs0 | ||
affinity: | ||
antiAffinityTopologyKey: none | ||
resources: | ||
limits: | ||
memory: 4G | ||
requests: | ||
memory: 1G | ||
volumeSpec: | ||
persistentVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
size: 3 | ||
configuration: | | ||
operationProfiling: | ||
mode: slowOp | ||
slowOpThresholdMs: 100 | ||
security: | ||
enableEncryption: false | ||
redactClientLogData: false | ||
setParameter: | ||
ttlMonitorSleepSecs: 60 | ||
wiredTigerConcurrentReadTransactions: 128 | ||
wiredTigerConcurrentWriteTransactions: 128 | ||
storage: | ||
engine: wiredTiger | ||
wiredTiger: | ||
collectionConfig: | ||
blockCompressor: snappy | ||
engineConfig: | ||
directoryForIndexes: false | ||
journalCompressor: snappy | ||
indexConfig: | ||
prefixCompression: true | ||
secrets: | ||
users: some-users |
This file contains hidden or 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,64 @@ | ||
apiVersion: psmdb.percona.com/v1 | ||
kind: PerconaServerMongoDB | ||
metadata: | ||
name: some-name-target | ||
spec: | ||
#platform: openshift | ||
image: | ||
imagePullPolicy: Always | ||
backup: | ||
enabled: true | ||
image: perconalab/percona-server-mongodb-operator:main-backup | ||
storages: | ||
minio: | ||
type: s3 | ||
s3: | ||
credentialsSecret: minio-secret | ||
region: us-east-1 | ||
bucket: operator-testing | ||
prefix: some-name-target | ||
endpointUrl: http://minio-service:9000/ | ||
insecureSkipTLSVerify: false | ||
pitr: | ||
enabled: false | ||
oplogSpanMin: 1 | ||
sharding: | ||
enabled: false | ||
replsets: | ||
- name: rs0 | ||
affinity: | ||
antiAffinityTopologyKey: none | ||
resources: | ||
limits: | ||
memory: 4G | ||
requests: | ||
memory: 1G | ||
volumeSpec: | ||
persistentVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
size: 3 | ||
configuration: | | ||
operationProfiling: | ||
mode: slowOp | ||
slowOpThresholdMs: 100 | ||
security: | ||
enableEncryption: false | ||
redactClientLogData: false | ||
setParameter: | ||
ttlMonitorSleepSecs: 60 | ||
wiredTigerConcurrentReadTransactions: 128 | ||
wiredTigerConcurrentWriteTransactions: 128 | ||
storage: | ||
engine: wiredTiger | ||
wiredTiger: | ||
collectionConfig: | ||
blockCompressor: snappy | ||
engineConfig: | ||
directoryForIndexes: false | ||
journalCompressor: snappy | ||
indexConfig: | ||
prefixCompression: true | ||
secrets: | ||
users: some-users |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The field
pitrType
is being used here but the sed replacement pattern on line 62 of the test script suggests this should betype
. This inconsistency could cause the restore configuration to be malformed.Copilot uses AI. Check for mistakes.