-
Notifications
You must be signed in to change notification settings - Fork 19
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(migration): add snapshot migration support for cstor #10
feat(migration): add snapshot migration support for cstor #10
Conversation
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
goto retry | ||
} | ||
if *newSnap.Status.BoundVolumeSnapshotContentName != snapContent.Name { | ||
return errors.Errorf("volumesnapshot %s is bound to incorrect volumesnapshotcontent: expected %s got %s", |
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.
can we also add ReadyToUse : true
check as well ?
// snapclientset.NewForConfig creates a new Clientset for VolumesnapshotV1beta1Client | ||
s.snapClient, err = snapclientset.NewForConfig(cfg) | ||
if err != nil { | ||
klog.Fatalf("Failed to create snapshot client: %v", err) |
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.
nit: failed to get snapshot client
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.
Fatal is fine here
return errors.Wrapf(err, "failed to validate new volumesnapshot %s", newSnap.Name) | ||
} | ||
klog.Infof("Cleaing up old volumesnapshot %s", oldSnap.Name) | ||
err = snap.NewKubeClient().WithNamespace(oldSnap.Namespace).Delete(oldSnap.Name, &metav1.DeleteOptions{}) |
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.
Add a note saying, users should perform migration only from latest version of OpenEBS.
Signed-off-by: shubham <[email protected]>
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.
changes are good
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.
lgtm
This PR adds support for migrating snapshots from
volumesnapshot.external-storage.k8s.io/v1
tosnapshot.storage.k8s.io/v1beta1
spec.