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

instancetype: Label ControllerRevisions with stored object metadata #9932

Conversation

lyarwood
Copy link
Member

@lyarwood lyarwood commented Jun 16, 2023

/area instancetype

What this PR does / why we need it:

ControllerRevisions are used to store point in time copies of instance
type and preference objects for each VirtualMachine making use of the
feature, see the following user-guide docs for more on this:

Instance types and preferences - Versioning
https://kubevirt.io/user-guide/virtual_machines/instancetypes/#versioning

This change adds labels to these ControllerRevision, exposing metadata
of the stored objects. With this in place it becomes easier to track the
objects stored within these ControllerRevisions and in the future
orchestrate the migration of these objects to newer versions of the API
and CRDs as these are introduced.

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 #9925

Special notes for your reviewer:

Release note:

`ControllerRevisions` containing `instancetype.kubevirt.io` `CRDs` are now decorated with labels detailing specific metadata of the underlying stashed object

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jun 16, 2023
@kubevirt-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. area/instancetype size/XS labels Jun 16, 2023
@kubevirt-bot kubevirt-bot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jun 16, 2023
@lyarwood lyarwood force-pushed the label-instancetype-v1beta1-controllerrevisions branch from a7fb79f to c8117ce Compare June 28, 2023 17:18
@lyarwood lyarwood force-pushed the label-instancetype-v1beta1-controllerrevisions branch 2 times, most recently from f79dd12 to ae8abbd Compare June 29, 2023 15:10
@lyarwood lyarwood changed the title WIP instancetype: Label ControllerRevisions with version and kind instancetype: Label ControllerRevisions with stored object metadata Jun 29, 2023
@lyarwood lyarwood marked this pull request as ready for review June 29, 2023 15:13
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 29, 2023
@lyarwood
Copy link
Member Author

/retest-required

@lyarwood
Copy link
Member Author

lyarwood commented Jul 6, 2023

/cc @0xFelix

@kubevirt-bot kubevirt-bot requested a review from 0xFelix July 6, 2023 14:59
Copy link
Member

@0xFelix 0xFelix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Looks good to me. But this only helps converting newly created ControllerRevisions, right? We still need to figure out how to convert older existing ones?

I also like that his allows for deduplication of ControllerRevisions!

I assume functests are not needed at this point?

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2023
@lyarwood
Copy link
Member Author

lyarwood commented Jul 7, 2023

Thanks!

Looks good to me. But this only helps converting newly created ControllerRevisions, right? We still need to figure out how to convert older existing ones?

Yes I think any conversion is going to assume that these labels aren't present to be begin with.

I also like that his allows for deduplication of ControllerRevisions!

Yeah hopefully allows us to look things up quickly without relying on the names etc.

I assume functests are not needed at this point?

I didn't think so at this point but happy to add something if required.

I'm still not sure about the names tbh, I think these could easily conflict in their present form so I might make them a little more specific to the ControllerRevisions this morning.

ControllerRevisions are used to store point in time copies of instance
type and preference objects for each VirtualMachine making use of the
feature, see the following user-guide docs for more on this:

Instance types and preferences - Versioning
https://kubevirt.io/user-guide/virtual_machines/instancetypes/#versioning

This change adds labels to these ControllerRevision, exposing metadata
of the stored objects. With this in place it becomes easier to track the
objects stored within these ControllerRevisions and in the future
orchestrate the migration of these objects to newer versions of the API
and CRDs as these are introduced.

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
@lyarwood lyarwood force-pushed the label-instancetype-v1beta1-controllerrevisions branch from ae8abbd to e0ee835 Compare July 7, 2023 09:41
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2023
Copy link
Member

@0xFelix 0xFelix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2023
Copy link
Member

@xpivarc xpivarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xpivarc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 21, 2023
@kubevirt-commenter-bot
Copy link

/retest-required
This bot automatically retries required jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@lyarwood
Copy link
Member Author

/cherry-pick release-1.0

@kubevirt-bot
Copy link
Contributor

@lyarwood: once the present PR merges, I will cherry-pick it on top of release-1.0 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.0

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/test-infra repository.

@kubevirt-bot kubevirt-bot merged commit 38f684a into kubevirt:main Jul 21, 2023
33 of 36 checks passed
@kubevirt-bot
Copy link
Contributor

@lyarwood: new pull request created: #10153

In response to this:

/cherry-pick release-1.0

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/instancetype dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ControllerRevisions created by instancetype.kubevirt.io provide no resource version metadata
5 participants