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

DEMO: add transfer-pvc subcommand to migrate pvc data #19

Merged
merged 2 commits into from
Aug 24, 2021

Conversation

alaypatel07
Copy link
Contributor

@alaypatel07 alaypatel07 commented Jul 21, 2021

This PR adds a subcommand to transfer a single PVC from one cluster to another.

A sample invocation of this command is as follows:

crane transfer-pvc --pvc-name foo --source-context=source-ctx --destination-context=destination-ctx

In this sample, you need to have the source-context and destination-context pointing to the cluster and namespace of the pvc Foo.

  1. It is assumed that the source namespace will be equal to the destination namespace, this will change in the future.
  2. The subcommand does not clean-up the resources it creates. In order to clean up manually before running use the following command:
$ oc --context=destination-ctx -n pvc-transfer-source delete pod,cm,secret,svc,route -l app=crane2 && oc --context=destination-ctx -n pvc-transfer-source delete pvc foo && oc --context=source-ctx -n pvc-transfer-source delete pod,cm,secret,svc,route -l app=crane2
  1. Currently the tool assumes PVC does not exist at the destination. Eventually we might want to provide configuration options to users on how to handle this case

@alaypatel07 alaypatel07 changed the title WIP: add transfer-pvc subcommand to migrate pvc data DEMO: add transfer-pvc subcommand to migrate pvc data Aug 18, 2021
@shawn-hurley
Copy link
Contributor

LGTM, create the issues for follow up and then lets merge

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