-
Notifications
You must be signed in to change notification settings - Fork 85
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
libvirt: Add podvm instance cpu/mem size support for libvirt #1650
Comments
Is there a VM profile or flavour concept in libvirt like the cloud providers? |
I'm not an expert, but I didn't see a profile/flavour concept when looking around, so I'll update the issue to be clearer about using annotations. |
Hmm.. I will check as well. Nonetheless it'll be good to update the description and mention about the annotations as well. At least the current limitation of fixed pod VM size will be get fixed |
Use io.katacontainers.config.hypervisor.default_vcpus and io.katacontainers.config.hypervisor.default_memory annotations to set the libvirt podvm instance. Use the default values if no annotations are provided. Fixes: confidential-containers#1650 Signed-off-by : savitrilh <[email protected]>
Add podvm instance cpu and mem size support for libvirt Fixes: confidential-containers#1650 Signed-off-by : savitrilh <[email protected]>
Add podvm instance cpu and mem size support for libvirt Fixes: confidential-containers#1650 Signed-off-by : SAVITRI HUNASHEEKATTI <[email protected]>
We have the mechanism to pass through cpu and memory annotations from kata-containers runtime via the pod spec, to select the instance size for some of the cloud provider (see
cloud-api-adaptor/src/cloud-api-adaptor/pkg/adaptor/cloud/cloud.go
Lines 192 to 203 in a5e37f4
Currently libvirt doesn't have this option and I think that the vm size created is hard-coded in
cloud-api-adaptor/src/cloud-providers/libvirt/libvirt.go
Lines 532 to 533 in a5e37f4
This is a bit of an issue as a) it's not very flexible for workloads b) for dev scenarios it's a bit of a problem as two kcli cluster nodes take 4 vCPU and 6GB vRAM, so to run the most basic single peer pods test you need 10 vCPU and 20GB RAM. If we can add support for specifying instance size of the libvirt peer pod vms that will allow the flexiiblity that you get with the other cloud providers.
I don't think that libvirt has the concept of an instance profile/flavour like the other cloud providers, so we'd want to use the
io.katacontainers.config.hypervisor.default_vcpus
andio.katacontainers.config.hypervisor.default_memory
annotations in the pod to drive the libvirt configuration, rather than usingio.katacontainers.config.hypervisor.machine_type
annotation like we do for some of the other platforms. I guess the default that we bake into the libvirt kustomize will need to be split into two fields as well for this?The text was updated successfully, but these errors were encountered: