Skip to content
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

backup/restore functionality - PVC subset #392

Merged
merged 29 commits into from
Jun 22, 2020

Conversation

miguelsorianod
Copy link
Contributor

@miguelsorianod miguelsorianod commented Jun 18, 2020

Merge backup/restore PVC subset new functionality integration branch into master

Copy link
Member

@eguzki eguzki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

deploy/role.yaml Outdated Show resolved Hide resolved
deploy/role.yaml Outdated Show resolved Hide resolved
doc/operator-backup-and-restore.md Show resolved Hide resolved
pkg/backup/apimanager_backup_options_provider.go Outdated Show resolved Hide resolved
pkg/restore/apimanager_restore.go Show resolved Hide resolved
@eguzki eguzki assigned miguelsorianod and unassigned eguzki Jun 19, 2020
@miguelsorianod miguelsorianod force-pushed the backup-restore-integration branch from 915673c to 2757151 Compare June 19, 2020 10:27
@miguelsorianod
Copy link
Contributor Author

Applied changes and answered comments

@miguelsorianod miguelsorianod requested a review from eguzki June 19, 2020 11:01
@miguelsorianod miguelsorianod removed their assignment Jun 19, 2020
@eguzki
Copy link
Member

eguzki commented Jun 19, 2020

comments left

@eguzki eguzki assigned miguelsorianod and unassigned eguzki Jun 19, 2020
@miguelsorianod
Copy link
Contributor Author

Changes applied

- Add APIManagerBackup type
- Add APIManagerRestore type
- Implement APIManagerBackup controller and model logic
with PVC as destination and PVC as System's FileStorage
- Implement APIManagerRestore controller and model logic
with PVC as source and PVC as System's FileStorage
- Add operator APIManager-based 3scale backup and restore documentation
…etCleanup

The job is now automatically deleted when deleting the CR (via ownerReference)
With a default or from an environment variable
Several restore steps always expected the shared secret
to always be available. However, one of the last steps is removing
them. That made steps fail in some situations where reconciliation
loop was reexecuted again.
This commit adds a new Status field 'APIManagerToRestoreRef' that
contains the name of the APIManager to restore, and the steps
that needed the secret now can do their tasks using this flag.
Implement path omission mechanism in CRD tests to exclude specific fields

When used fields in the CRDs have unexported fields or are serialized
in a different format than the defined Golang object the
schema.MissingEntries method reports them as missing.
Implemented a mechanism to be able to ignore specific entries
and added the ones where we were having this situation.
@miguelsorianod miguelsorianod force-pushed the backup-restore-integration branch 2 times, most recently from 2a2738d to c9ca8a8 Compare June 19, 2020 15:08
@eguzki
Copy link
Member

eguzki commented Jun 19, 2020

LGTM

Fix failing tests and let's merge

@eguzki eguzki assigned miguelsorianod and unassigned eguzki Jun 19, 2020
@miguelsorianod miguelsorianod force-pushed the backup-restore-integration branch from 25ef4e5 to 5f68780 Compare June 19, 2020 17:41
@codeclimate
Copy link

codeclimate bot commented Jun 19, 2020

Code Climate has analyzed commit 5f68780 and detected 124 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 16
Duplication 36
Style 72

View more on Code Climate.

@miguelsorianod
Copy link
Contributor Author

Fixed failing tests: added back the wildcard permission on apps.3scale.net, the removal of it was causing errors creating some objects https://app.circleci.com/pipelines/github/3scale/3scale-operator/2061/workflows/749dbf90-69c4-40d6-821b-2c8d87a2fc2f/jobs/13598

@eguzki eguzki removed their assignment Jun 22, 2020
@miguelsorianod miguelsorianod merged commit 8905e4a into master Jun 22, 2020
@eguzki eguzki deleted the backup-restore-integration branch June 23, 2020 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants