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

Add backup tool #315

Merged
merged 2 commits into from
May 27, 2022
Merged

Add backup tool #315

merged 2 commits into from
May 27, 2022

Conversation

loheagn
Copy link
Contributor

@loheagn loheagn commented May 26, 2022

The PR contains two main changes:

  1. Enhance the restore tool. The restore tool can print the log of the terraform apply now.

  2. Add the backup tool.

loheagn added 2 commits May 27, 2022 00:07
Signed-off-by: loheagn <[email protected]>
@loheagn
Copy link
Contributor Author

loheagn commented May 26, 2022

Fix #310

@codecov
Copy link

codecov bot commented May 26, 2022

Codecov Report

❗ No coverage uploaded for pull request base (master@2117b20). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #315   +/-   ##
=========================================
  Coverage          ?   78.18%           
=========================================
  Files             ?       23           
  Lines             ?     1595           
  Branches          ?        0           
=========================================
  Hits              ?     1247           
  Misses            ?      268           
  Partials          ?       80           
Flag Coverage Δ
e2e 0.00% <0.00%> (?)
unit 81.87% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2117b20...0385901. Read the comment docs.


Then you will get the `cofiguration.yaml` and the `state.json` in the workdir.

Next, you can restore the Configuration and the Terraform state in another Kubernetes cluster using the `restore` subcommand.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The configuration could not get restored as some fields of metadata need to be cleaned before restoring.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, the configuration will be cleaned before encode it into yaml.

You can checkout the cleanUpConfiguration function here.

Copy link
Collaborator

@zzxwill zzxwill left a comment

Choose a reason for hiding this comment

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

Great job!

@zzxwill zzxwill merged commit ae8296e into kubevela:master May 27, 2022
@loheagn loheagn deleted the backup branch May 27, 2022 03:08
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