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
Pass annotations from DV to PVC. #899
Conversation
ced3910
to
bb387ab
Compare
Signed-off-by: Alexander Wels <awels@redhat.com>
bb387ab
to
d2d92a4
Compare
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.
Looks good to me but I'd update the PR title and description to reflect that we how have a general annotation passthrough mechanism.
Done |
LGTM |
@@ -939,6 +939,10 @@ func newPersistentVolumeClaim(dataVolume *cdiv1.DataVolume) (*corev1.PersistentV | |||
|
|||
annotations := make(map[string]string) | |||
|
|||
for k, v := range dataVolume.ObjectMeta.Annotations { |
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.
This is fine, but I would suggest at least considering a PVC-Annotations section on the DV. Passing through is certainly easy and works; but it's not always applicable and at some point you may run the risk of collisions. I'm good either way, but I do think it should be mentioned.
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.
Agreed, but that would cause us to have to be vendored into kubevirt, this is a fairly minimal change that doesn't require vendoring. And yes the collisions is a concern, but we have some order guarantee, if we collide with annotations created by the controller, those annotations will win.
We can do a follow up PR for master to add this field.
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.
Not sure about that vs an annotations key, but regardless; I'm fine with this for now.
Just waiting for CI.
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.
Ok, I guess we won't wait for CI to run
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.
We did wait, actually, but we have known failures that happened, I verified that those are the only failures.
Signed-off-by: Alexander Wels <awels@redhat.com>
Signed-off-by: Alexander Wels <awels@redhat.com>
Signed-off-by: Alexander Wels awels@redhat.com
What this PR does / why we need it:
Pass annotations from Data Volume to PVC.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note: