On Thu, May 24, 2018 at 8:56 PM, Itamar Heim <ih...@redhat.com> wrote:On 05/24/2018 08:20 PM, Steve Gordon wrote:
+1. The other aspect IIRC was that hooks weren't just restricted to
modifying the XML though...which might pose some interesting things to
think about when we consider those that modified the host?
yes, these would be trickier for containers.
actually, a lot of those changing the libvirt xml also influenced the host, so not sure yet how this would work.
for example, something simple - cpu pinning - is that something a process inside a pod can do outside of what the kubernetes cpu pinning defines (if/when).
but seems like we're assuming user accessible environment, and Alexander may have a restricted one, where this is just a flexible backend which would be a bit more flexible.
Thanks for the follow up. So let me try and summarize:We need to extend the framework in 2 ways:1) Pre VM Launch - so we can perform bootstrapping steps
2) Passing arguments to the VM - via filesystem or other wise.
On Fri, May 25, 2018 at 11:28 PM, Alexander Gallego <galleg...@gmail.com> wrote:On Thu, May 24, 2018 at 8:56 PM, Itamar Heim <ih...@redhat.com> wrote:On 05/24/2018 08:20 PM, Steve Gordon wrote:
+1. The other aspect IIRC was that hooks weren't just restricted to
modifying the XML though...which might pose some interesting things to
think about when we consider those that modified the host?
Jumping in here a little.The domxml of libvirt, and libvirtD config parameters are probably something we do not want to formally expose in KubevIrt (at least ATM).So far any hooks or alike KubeVirt should support should work on the VM SPec and other KubeVirt objects - aka on the cluster level.The domxml is an implementation detail.However, I do recognize the need to modify them. And I still think that initContainers are an interesting idea.In general I do see two patterns which might help us:- Life-cycle hooks on the cluster level, triggering webhooks - just likes it's done for other Kube parts (i.e. with custom admission controllers) see slide 21 of https://www.slideshare.net/sttts/kubecon-eu-2018-sig-api-machinery-deep-dive/21This could be used to allow a user to modify the YAML- Life-cycle hooks on the pod level, using gRPC just like it's done for i.e. device plugins or cri. The hook itself could be delivered as container, hooking into the life-cycle events.This could be used to allow the user to modify the pod and domxml
yes, these would be trickier for containers.
actually, a lot of those changing the libvirt xml also influenced the host, so not sure yet how this would work.
for example, something simple - cpu pinning - is that something a process inside a pod can do outside of what the kubernetes cpu pinning defines (if/when).
but seems like we're assuming user accessible environment, and Alexander may have a restricted one, where this is just a flexible backend which would be a bit more flexible.
Thanks for the follow up. So let me try and summarize:We need to extend the framework in 2 ways:1) Pre VM Launch - so we can perform bootstrapping stepsCould you explain this case a little more?I can understand it in a few ways:- Run something on the first start of a VM which will be started again- Run something whenevr a specific VM starts2) Passing arguments to the VM - via filesystem or other wise.What kind of arguments would you like to pass?
Who should receive the arguments?
(On that side it would be cool to gain ConfigMap and Secret support for VMs - to pas them into the VM, just like with pods).
- fabian
On 05/25/2018 05:28 PM, Alexander Gallego wrote:
>
> On Thu, May 24, 2018 at 8:56 PM, Itamar Heim <ih...@redhat.com
> <mailto:ih...@redhat.com>> wrote:
>
> On 05/24/2018 08:20 PM, Steve Gordon wrote:
>
> +1. The other aspect IIRC was that hooks weren't just restricted to
> modifying the XML though...which might pose some interesting
> things to
> think about when we consider those that modified the host?
>
>
> yes, these would be trickier for containers.
> actually, a lot of those changing the libvirt xml also influenced
> the host, so not sure yet how this would work.
> for example, something simple - cpu pinning - is that something a
> process inside a pod can do outside of what the kubernetes cpu
> pinning defines (if/when).
>
> but seems like we're assuming user accessible environment, and
> Alexander may have a restricted one, where this is just a flexible
> backend which would be a bit more flexible.
>
>
>
> Thanks for the follow up. So let me try and summarize:
>
> We need to extend the framework in 2 ways:
>
> 1) Pre VM Launch - so we can perform bootstrapping steps
I'd generalize for various life cycle phases, not just BeforeStartVM.
> 2) Passing arguments to the VM - via filesystem or other wise.
why not via cloud-init?
>
> There exists 5-6 possible alternatives to support the 'SuperUser' mode
> that is allowed to do these steps:
>
> 1) Kubernetes RBAC -
> 2) Kubernetes ABAC - I think we can make it work with ABAC's
> 3) CRD's for AdminVMs
> 4) Admissions Controllers
> 5) Kubevirt whitelisted hooks that cover all of the stated usecases
> (maybe through code generation of all config settings supported by
> libvirtd??)
>
> 6) Not support these use cases from Kubevirt's point of view.
>
I think we do want to support this.
Its just how do we let the admin define the containers for the phases we
want to support so they are called in the right place (our own
mechanism, webhooks, etc.)
then how the user can pass extra parameters in the vm yaml to influence
their run).
>
> Let me know !
>
> (maybe community poll ? ha not sure - any suggestions on how to get some
> data/opinions on the options to be exposed)
>
>
>
--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubevi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/8051a47f-77c3-4406-bc2a-9cf322cf4407%40googlegroups.com.