-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: preferredCPUTopology cleanups #11927
base: main
Are you sure you want to change the base?
instancetype: preferredCPUTopology cleanups #11927
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
9d6638e
to
66d554a
Compare
Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
66d554a
to
b524f3a
Compare
/sig api Would you mind taking a look at this from a |
// Prefer vCPUs to be exposed as cores to the guest | ||
// | ||
// Deprecated, use cores instead. | ||
PreferCores PreferredCPUTopology = "preferCores" |
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.
Kubernetes adds Depracated prefix to the api fields without changing the values. Should we follow this pattern here?
cc @EdDev
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.
Should/Can we add a deprecation notice for users in the admitter?
/area instancetype
What this PR does
This PR introduces shorter
preferredCPUTopology
constants to make the API slightly easier for users:PreferSockets
->sockets
PreferCores
->cores
PreferThreads
->threads
PreferSpread
->spread
PreferAny
->any
The original constants are now deprecated and support will be dropped in a future version of the
instancetype.kubevirt.io
API with these values converted during upgrade and thus requiring no user actions.It also adds missing admission validation for
preferredCPUTopology
to ensure only supported values are accepted. This includes validation ofvirtctl
input when creating a preference manifest.Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer
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.
Release note