-
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
feat(virtctl): Allow to infer from specified volume in create vm #9631
feat(virtctl): Allow to infer from specified volume in create vm #9631
Conversation
cfd12f6
to
4d6db2b
Compare
/cc @lyarwood |
Hi. Does this mean that the IT / Pref would be infered on the client side? |
Nope, that part remains on the backend, this is just populating the |
2992b1e
to
81b4f09
Compare
@fabiand Lee is right, this makes use of the backend side lookup. IMO it is best to keep |
pkg/virtctl/create/vm/vm.go
Outdated
@@ -163,11 +165,13 @@ func NewCommand() *cobra.Command { | |||
cmd.Flags().Int64Var(&c.terminationGracePeriod, TerminationGracePeriodFlag, c.terminationGracePeriod, "Specify the termination grace period of the VM.") | |||
|
|||
cmd.Flags().StringVar(&c.instancetype, InstancetypeFlag, c.instancetype, "Specify the Instance Type of the VM.") | |||
cmd.Flags().BoolVar(&c.inferInstancetype, InferInstancetypeFlag, c.inferInstancetype, "Specify that the Instance Type of the VM is inferred from the booted volume.") | |||
cmd.Flags().StringVar(&c.inferInstancetype, InferInstancetypeFlag, c.inferInstancetype, "Specify that the Instance Type of the VM should be inferred. Optionall specify the volume to infer from.") |
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.
typo: Optionall
-> Optionally
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.
Fixed
81b4f09
to
c59cf09
Compare
No positional arguments to this command are expected so the appropriate validator is added. Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This changes the --infer-instancetype and --infer-preference flags to take optional strings which allow to specify the volume of the VM from which the instancetype or preference should be inferred from. If no string is passed the previous behaviour is kept (infer from first boot disk or first volume). Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
c59cf09
to
ed7869b
Compare
/retest |
@0xFelix: 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/test-infra repository. I understand the commands that are listed here. |
I think it looks good, thanks Felix! /lgtm |
/approve |
1 similar comment
/approve |
/approve Hopefully, it should now work |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alicefr 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 |
/retest-required |
1 similar comment
/retest-required |
What this PR does / why we need it:
This changes the --infer-instancetype and --infer-preference flags to
take optional strings which allow to specify the volume of the VM from
which the instancetype or preference should be inferred from. If no
string is passed the previous behaviour is kept (infer from first boot
disk or first volume).
Special notes for your reviewer:
This is based on #9629, merge after.
Release note: