-
Notifications
You must be signed in to change notification settings - Fork 65
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
feat: Implement version rollback for server restore #1680
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1680 +/- ##
==========================================
- Coverage 11.29% 11.02% -0.27%
==========================================
Files 63 63
Lines 6569 6709 +140
Branches 1111 1142 +31
==========================================
- Hits 742 740 -2
- Misses 5827 5969 +142
Continue to review full report at Codecov.
|
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mmorhun, tolusha The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Mykola Morhun <[email protected]>
New changes are detected. LGTM label has been removed. |
Signed-off-by: Mykola Morhun <[email protected]>
Signed-off-by: Mykola Morhun <[email protected]>
What does this PR do?
Implements ability to restore to a different version of Che than deployed operator.
It added several new falgs to
server:restore
command:--rollback
- finds backup made automatically and restores Che operator to the previous version and restore installation from the backup--backup-cr
- restores Che from given backup described by a backup object (it includes Che version as well)--version
- before restoring Che installation, deploys given version of Che Operator (usually used together with--snapshot-id
)Screenshot/screencast of this PR
What issues does this PR fix or reference?
https://issues.redhat.com/browse/CRW-1497
How to test this PR?
The script should push images to your images registry account. Remember catalog source image name, for example:
docker.io/user/eclipse-che-openshift-opm-catalog:preview
3. Open Openshift console, navigate to
Administration
->Cluster Settings
->Configuration
tab. Scroll to and click onOperatorHub
. Switch toSources
tab. ClickCreate CatalogSource
. Fill in the fields withtest
and put your catalog source image. ClickCreate
button.4. Create subscription for the real latest version in stable channel (but there is your fake one on top, so it is possible to update to). Example subscription yaml (change
startingCSV
to real latest stable one):oc get ip
, select pending to your fake version install plan and edit it:oc edit ip <install-planname>
. Setspec.approved
totrue
.backup-before-update-to-7-37-0
(the version should be your fake one)../debug server:restore --rollback
. Note, you have to stop inolm.ts
constructSubscription
function and replacesourceName
to your catalog source name (test
). It might be omitted if your replace exiting catalog source image instead of adding a new one.PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.