-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Graduate the clone API to v1beta1 and deprecate v1alpha1 #13520
base: main
Are you sure you want to change the base?
Conversation
To align with: kubevirt/kubevirt#13520 Signed-off-by: Itamar Holder <[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.
Thank you for the PR. I have a small question.
80aea0b
to
40a278b
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.
I think we should also change:
VIRTUALMACHINECLONE = "virtualmachineclones." + clonev1alpha1.VirtualMachineCloneKind.Group |
like they did with snapshot transition to beta:
"kubevirt.io/api/clone" | ||
clonev1alpha1 "kubevirt.io/api/clone/v1alpha1" | ||
clonebase "kubevirt.io/api/clone" | ||
clone "kubevirt.io/api/clone/v1beta1" |
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.
+1 for the alias
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.
would you not prefer clonev1
instead of clone
? from my experience that is usually the naming pattern for kube APIs
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.
Isn't clonev1
for the v1
version?
My idea here is to name it generically as clone
which serves as the latest version of clone. This way when we'll decide to bump it to v1 we won't need to rename the alias.
TBH I don't feel strongly on this, but think if we want to change it then clonev1beta1
or clonebeta1
would be better than clonev1
. WDYT?
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.
it's fine, you can keep this
4d9623c
to
293fcd4
Compare
I switched to Thank you! |
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.
Thank you!
/lgtm
Name: clonev1alpha1.SchemeGroupVersion.Version, | ||
Served: true, | ||
Storage: false, | ||
Deprecated: true, | ||
DeprecationWarning: pointer.P("clone.kubevirt.io/v1alpha1 VirtualMachineClone is now deprecated and will be removed in v1."), | ||
}, | ||
{ | ||
Name: clonev1beta1.SchemeGroupVersion.Version, |
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: I'ts probably the default value, i can't find it in the docs but with other objects we add:
Conversion: &extv1.CustomResourceConversion{
Strategy: extv1.NoneConverter,
},
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.
Thanks for catching that!
I've verified that it is the default value:
func SetDefaults_CustomResourceDefinitionSpec(obj *CustomResourceDefinitionSpec) {
if len(obj.Names.Singular) == 0 {
obj.Names.Singular = strings.ToLower(obj.Names.Kind)
}
if len(obj.Names.ListKind) == 0 && len(obj.Names.Kind) > 0 {
obj.Names.ListKind = obj.Names.Kind + "List"
}
if obj.Conversion == nil {
obj.Conversion = &CustomResourceConversion{
Strategy: NoneConverter,
}
}
}
@mhenriks do you mind having a look? thanks! |
Pull requests that are marked with After that period the bot marks them with the label /label needs-approver-review |
@ShellyKa13 @akalenyu can one of you please review as storage approvers? |
ping @ShellyKa13 @akalenyu |
While this is not a big deal, I recalled us not deprecating alpha on this change for the snapshot/export APIs |
293fcd4
to
06fdd45
Compare
New changes are detected. LGTM label has been removed. |
Signed-off-by: Itamar Holder <[email protected]>
Generated with "make generate" Signed-off-by: Itamar Holder <[email protected]>
Also refactor import aliases: clonebase "kubevirt.io/api/clone" clonev1alpha1 "kubevirt.io/api/clone/v1alpha1" clonev1beta1 "kubevirt.io/api/clone/v1beta1" Signed-off-by: Itamar Holder <[email protected]>
By running "make generate" Signed-off-by: Itamar Holder <[email protected]>
Signed-off-by: Itamar Holder <[email protected]>
Signed-off-by: Itamar Holder <[email protected]>
06fdd45
to
63a5841
Compare
Thank you @akalenyu!
Thanks for the LGTM 😄 but TBH I was expecting you'd review this as an approver and not a reviewer. We're new to this, but in general this is the new review workflow as I see it:
Would you mind reviewing this as a storage-approver and |
gotcha |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akalenyu The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@enp0s3 mind having another look? |
@alicefr it's quite common for these health checks to fail after the persistent reservation tests, but I am not sure why. From a glance it looks like it waits for kubevirt to stabilize |
/test pull-kubevirt-e2e-k8s-1.32-sig-storage |
@iholder101: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What this PR does
The clone API was introduced about a year and a half ago: #7336.
Since then, it had been used by both our functional test suite, but also by real-life users.
Therefore, this PR graduates the API from v1alpha1 to v1beta1, and deprecates the former.
p.s. a user-guide update is ready to merge after this would get in: kubevirt/user-guide#859.
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Design: A design document was considered and is present (link) or not requiredUpgrade: Impact of this change on upgrade flows was considered and addressed if requiredTesting: New code requires new unit tests. New features and bug fixes require at least on e2e testCommunity: Announcement to kubevirt-dev was consideredRelease note