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
chore(csi-driver): update driver to read PVC, PV name in CreateVolume request #90
chore(csi-driver): update driver to read PVC, PV name in CreateVolume request #90
Conversation
…uest Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Codecov Report
@@ Coverage Diff @@
## master #90 +/- ##
=======================================
Coverage 63.88% 63.88%
=======================================
Files 7 7
Lines 335 335
=======================================
Hits 214 214
Misses 108 108
Partials 13 13 Continue to review full report at Codecov.
|
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
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 👍 Given few comments. PTAL.
// volumeCreatedThrough used to identify through which PVC is created | ||
// NOTE: This annoation will be available on PVC only if velero-plugin | ||
// creates as PVC as a part of restore request | ||
volumeCreatedThrough = "openebs.io/created-through" |
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 move it to openebs/api since this is used in plugin/maya/cstor-operator and here also, better to have it under openebs/api.
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.
Sure, I need to make similar changes in cstor-operaters repo also. Once this gets PR gets in I will do that.
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
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
What this PR does:
This PR updates the CSI driver to read PVC name,
PVC namespace, and PV name during CreateVolume
request. If the driver gets PVC name and namespace
it will fetch the entire PVC object from etcd and propagate
the
openebs.io/created-through
annotation to CVC if it existson annotation.
This annotation will inform the CVC controller to create CVR
with annotation
isRestoreVol: true
. If this annotation is set thenCVR controller will not the targetIP during zfs dataset creation.
Note:
PVC with the annotation
openebs.io/created-through: restore
.extra-create-metadata
tocsi-provisioner
then it will send PVC name, namespace and PV name to CSI-dirver
as part of the CreateVolume request.
Reference PR: add pvc metadata to createvolume req kubernetes-csi/external-provisioner#399
Which issue(s) this PR fixes:
Fixes # openebs/openebs#2905
Special notes for your reviewer:
Checklist
documentation
tagrequires-upgrade
tag