-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add support for instance types #824
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #824 +/- ##
==========================================
- Coverage 15.83% 15.78% -0.05%
==========================================
Files 108 108
Lines 19911 19973 +62
==========================================
Hits 3153 3153
- Misses 16479 16541 +62
Partials 279 279
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Based on kubev2v/forklift-console-plugin#1017 (comment), do we wish to query and add the instance types to the inventory in order to let UI do a selection box instead of string? |
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'm missing a validation for the instance type as part of the plan validation
@@ -326,6 +329,9 @@ func (r *Builder) mapCPU(vm *model.VM, object *cnv.VirtualMachineSpec) { | |||
vm.CoresPerSocket = 1 | |||
} | |||
object.Template.Spec.Domain.Machine = &cnv.Machine{Type: "q35"} |
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.
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 might have made it quite the opposite, please revisit
1fd81a1
to
09134e9
Compare
Quality Gate passedIssues Measures |
51f5756
to
32b9f9e
Compare
Quality Gate passedIssues Measures |
Setting the `instanceType` to the VM will set the specific VM in the plan with the selected instance type available in the destination cluster (if found). This means, the VM won't be set with their original CPUs and memory they had in the source environment. Signed-off-by: Liran Rotenberg <[email protected]>
Set the selected instance type if exists on the VM. First we will try to find the namespaced instance type. If not found, we will lookup for the cluster wide one. Once the instance type is set, we skip setting the CPU and memory requested resources. Signed-off-by: Liran Rotenberg <[email protected]>
In order to let the UI consume this feature nicely, two new endpoints were added for virtualmachineinstancetypes and virtualmachineclusterinstancetypes. They will be added to the inventory and will let the UI to use them. Signed-off-by: Liran Rotenberg <[email protected]>
Signed-off-by: Liran Rotenberg <[email protected]>
Signed-off-by: Liran Rotenberg <[email protected]>
Setting the
instanceType
to the VM will set the specific VM inthe plan with the selected instance type available in the destination
cluster (if found). This means, the VM won't be set with their original
CPUs and memory they had in the source environment.