[RFE] give option to add labels while selecting to import vm
vatsalparekh opened this issue · 12 comments
In the import vm for, there should be option to add labels for that vm
this issue is basically blocking us from being able to virtctl expose a vm which was created by the apb.
can we please push this?
cc @aglitke
Can you describe specifically which labels you want to apply? It doesn't seem very user-friendly to require users to enter labels in the form? Can these labels be added to the j2 templates for the windows and linux vm flavors?
Our VMs and templates are created dynamically so if there is a reasonable way to calculate the needed annotations we could apply them automatically.
I think virtctl expose
needs at-least some labels in VM object to add its own labels there
So even if we let user add labels from apb UI and user doesn't add label, virtctl expose still won't work for VM created/imported from import-vm-apb
So I feel solution would be to simply add any simple (dummy?) label
But letting users add labels would be also a nice thing
@vatsalparekh Can you tell me which label(s) need to be applied for virtctl expose to work properly?
@vatsalparekh @aglitke yes virtctl expose
works exactly like kubectl expose
just for vm related resources. In general to expose anything via services in k8s, it needs labels. The kubectl expose
does not invent labels for the user.
the thing is that it needs to be unique per vm afaik
@fabiand can add more details
@nellyc @aglitke also have a look at headless services in k8s and headless services in kubevirt. A headless service is the only type of service which work without labels and more than just udp/tcp (e.g also icmp for vms).
Fixed by updates to the VM yaml files used by the APB.