--
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/71e6d823-20e9-43c9-8b56-cdf6c296dc55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hey Alex,initContainers are not supported on VMs - yet.Today we technically copy labels and annotations - we'd need to do this whitelisting for every pod feature we want to expose.
We could do it - technically - but could you explain your use case in order to understand what you try to achieve?
On Tue, May 22, 2018 at 4:16 PM, Fabian Deutsch <fdeu...@redhat.com> wrote:Hey Alex,initContainers are not supported on VMs - yet.Today we technically copy labels and annotations - we'd need to do this whitelisting for every pod feature we want to expose.fair enough.We could do it - technically - but could you explain your use case in order to understand what you try to achieve?I was trying to hack doing a work around the macvtap mounting on the VM via:```
sudo ip link add link eth0 name macvtap0 address ma:cc:ad:dd:rr:ee:ss type macvtap mode bridge
ip link set <interface> netns namespace ${PID}
```so i can create a macvtap device and test mount it as a proof of concept.
but, i do know other teams use that feature.What I understand from a different team and their use of it is:A use case is we mount an encrypted volume. Keys get mounted to the init container. the init container does some decryption + some setup + bridges an old dynamic compute use cases w/ k8s. Then starts the main container the user wanted to use.So the gist is currently it is use to bridge a different use case to run on k8s.
Greetings- fabian
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@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/71e6d823-20e9-43c9-8b56-cdf6c296dc55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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...@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/CAL%2BiW28sPzCSFjguB7jsduk%3DBB9N5rP2bzHQn0tMV%3Dek1CcwSw%40mail.gmail.com.
Greetings- fabian
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/71e6d823-20e9-43c9-8b56-cdf6c296dc55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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.
<SNIP>
Yeah, I see that point.In general it looks like a practical hack (initContainers).- fabian
Greetings- fabian
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
On Tuesday, May 22, 2018 at 1:49:31 PM UTC-7, Fabian Deutsch wrote:<SNIP>Yeah, I see that point.In general it looks like a practical hack (initContainers).- fabian
Though some of us would want to use vm's in a multitenant environment, so ensuring the user couldn't inject something bad for the cluster would be important.
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/ce2d18b3-ce5e-4d99-a482-a27968a641f5%40googlegroups.com.
On Tue, May 22, 2018 at 10:55 PM, <kfox11...@gmail.com> wrote:
On Tuesday, May 22, 2018 at 1:49:31 PM UTC-7, Fabian Deutsch wrote:<SNIP>Yeah, I see that point.In general it looks like a practical hack (initContainers).- fabian
Though some of us would want to use vm's in a multitenant environment, so ensuring the user couldn't inject something bad for the cluster would be important.Good point.
--
You received this message because you are subscribed to a topic in the Google Groups "kubevirt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubevirt-dev/HZ5dbmhwpsg/unsubscribe.
To unsubscribe from this group and all its topics, 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/CA%2BPVUaT%3DvcFL-EgRdrFLBJjTjoVFd_SWKWBfg0OdfnKekjJAgw%40mail.gmail.com.
On Tue, May 22, 2018 at 5:00 PM, Fabian Deutsch <fdeu...@redhat.com> wrote:
On Tue, May 22, 2018 at 10:55 PM, <kfox11...@gmail.com> wrote:
On Tuesday, May 22, 2018 at 1:49:31 PM UTC-7, Fabian Deutsch wrote:
<SNIP>Yeah, I see that point.
In general it looks like a practical hack (initContainers).
- fabian
Though some of us would want to use vm's in a multitenant environment, so ensuring the user couldn't inject something bad for the cluster would be important.
Good point.
You should be able to control this via https://kubernetes.io/docs/admin/admission-controllers/#securitycontextdeny
Plus if you can launch a VM you can launch a Pod and if you can launch a Pod you can launch a different security context if no admission-controller is set.
so AFAIK you'll have to have that anyway.
Thanks,
Itamar
On Tue, May 22, 2018 at 10:45 PM, Alexander Gallego <galleg...@gmail.com> wrote:On Tue, May 22, 2018 at 4:16 PM, Fabian Deutsch <fdeu...@redhat.com> wrote:Hey Alex,initContainers are not supported on VMs - yet.Today we technically copy labels and annotations - we'd need to do this whitelisting for every pod feature we want to expose.fair enough.We could do it - technically - but could you explain your use case in order to understand what you try to achieve?I was trying to hack doing a work around the macvtap mounting on the VM via:```
sudo ip link add link eth0 name macvtap0 address ma:cc:ad:dd:rr:ee:ss type macvtap mode bridge
ip link set <interface> netns namespace ${PID}
```so i can create a macvtap device and test mount it as a proof of concept.Nifty.For the POC you can probably create a new docker image whcih you derive from the launcher pod.There you can add a script to perform the necessary steps.Does that work?
Greetings- fabian
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
On Tuesday, May 22, 2018 at 4:49:31 PM UTC-4, Fabian Deutsch wrote:On Tue, May 22, 2018 at 10:45 PM, Alexander Gallego <galleg...@gmail.com> wrote:On Tue, May 22, 2018 at 4:16 PM, Fabian Deutsch <fdeu...@redhat.com> wrote:Hey Alex,initContainers are not supported on VMs - yet.Today we technically copy labels and annotations - we'd need to do this whitelisting for every pod feature we want to expose.fair enough.We could do it - technically - but could you explain your use case in order to understand what you try to achieve?I was trying to hack doing a work around the macvtap mounting on the VM via:```
sudo ip link add link eth0 name macvtap0 address ma:cc:ad:dd:rr:ee:ss type macvtap mode bridge
ip link set <interface> netns namespace ${PID}
```so i can create a macvtap device and test mount it as a proof of concept.Nifty.For the POC you can probably create a new docker image whcih you derive from the launcher pod.There you can add a script to perform the necessary steps.Does that work?Do you know where I can override this image on the vm.yml file.it is not immediately obvious to me what the name of the virt-launcher image is called where to override it - so i can push this to my registry for example
On Tuesday, May 22, 2018 at 9:19:57 PM UTC-4, Alexander Gallego wrote:
On Tuesday, May 22, 2018 at 4:49:31 PM UTC-4, Fabian Deutsch wrote:On Tue, May 22, 2018 at 10:45 PM, Alexander Gallego <galleg...@gmail.com> wrote:On Tue, May 22, 2018 at 4:16 PM, Fabian Deutsch <fdeu...@redhat.com> wrote:Hey Alex,initContainers are not supported on VMs - yet.Today we technically copy labels and annotations - we'd need to do this whitelisting for every pod feature we want to expose.fair enough.We could do it - technically - but could you explain your use case in order to understand what you try to achieve?I was trying to hack doing a work around the macvtap mounting on the VM via:```
sudo ip link add link eth0 name macvtap0 address ma:cc:ad:dd:rr:ee:ss type macvtap mode bridge
ip link set <interface> netns namespace ${PID}
```so i can create a macvtap device and test mount it as a proof of concept.Nifty.For the POC you can probably create a new docker image whcih you derive from the launcher pod.There you can add a script to perform the necessary steps.Does that work?Do you know where I can override this image on the vm.yml file.it is not immediately obvious to me what the name of the virt-launcher image is called where to override it - so i can push this to my registry for exampleI guess is this: https://hub.docker.com/r/kubevirt/virt-launcher/but not sure how to override it.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/a540a426-356b-481b-8424-a295a583fb5d%40googlegroups.com.
- fabian
Thanks,
Itamar
I just wonder how many environment allow users to choose to run privileged containers.
--
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/fa9bc252-dd00-c559-8aa2-28c7e5743164%40redhat.com.
On 05/24/2018 04:53 PM, Marcus wrote:
It's an interesting way to allow administrators to 'tack on' functionality to Kubevirt. In general, I don't like the idea of allowing users to reach in and manipulate what is going on at the pod level in Kubevirt, it requires some knowledge of kubevirt's launcher. I'd probably opt to hide the VM pod altogether from the user, actually, and have them interact with only the Kubevirt CRDs.
I do understand the temptation to create a 'hook' here, but I would expect external things to break often as Kubevirt is developed on. It will require vigilance on the maintainer of the initContainer.
I agree that admission controllers could be used to block people from running initContainers if desired, and that it could also be a configurable in Kubevirt.
In general I'd like to see the launcher pod's permissions reduced. I've played with removing privileged mode and right now it needs mknod (which is basically full admin capability) and network admin. I think that this may make it harder to reduce privileges down the road if people become accustomed to adding all sorts of ad-hoc admin functionality into the launcher pod. We don't allow users to create privileged containers at all, in general, and there was some OPA tweaking required to allow Kubevirt to do so on a user's behalf.
The encrypted volume thing is definitely a use case of interest, though I think the direction I'm looking at is going to be cluster-wide and automatic to all pods using a certain storage class, Kubevirt or not, rather than user-created. That only works if you own the cluster, though, can't do that in someone else's.
I'm kind of "all for hooks", but, "defined by the admin, not the user", to avoid security/compat issues.
I can see adding support for initContainers, if currently say, disabled by default, and the admin need to change a config for it to enable it, as it allows an end user to manipulate the VM flow, it shouldn't be enabled by default, especially when we are still launching privileged.
<mailto:kubevirt-dev%2Bunsubscri...@googlegroups.com>.send an email to kubevirt-dev+unsubscribe@googlegroups.com
To post to this group, send email to kubevi...@googlegroups.com
<mailto:kubevirt-dev@googlegroups.com>.
I think a mutating admission controller could patch pods, virt-launcher or not, if you haven't already looked at that.
Regarding admin-only, I think it's the idea that anyone could apply a VM yaml that has an 'initContainers', which calls a container that modifies the behavior of the virt-launcher pod. It's more palatable if it were something the admin could add to virt-launcher, but the user had no control over. Imagine perhaps various initContainer 'plugins' that could be listed on the virt-controller CLI so it would apply them when it deploys instances of virt-launcher. User has no control but the admin does.
It's an interesting way to allow administrators to 'tack on' functionality to Kubevirt. In general, I don't like the idea of allowing users to reach in and manipulate what is going on at the pod level in Kubevirt, it requires some knowledge of kubevirt's launcher. I'd probably opt to hide the VM pod altogether from the user, actually, and have them interact with only the Kubevirt CRDs.I do understand the temptation to create a 'hook' here, but I would expect external things to break often as Kubevirt is developed on. It will require vigilance on the maintainer of the initContainer.I agree that admission controllers could be used to block people from running initContainers if desired, and that it could also be a configurable in Kubevirt.In general I'd like to see the launcher pod's permissions reduced. I've played with removing privileged mode and right now it needs mknod (which is basically full admin capability) and network admin. I think that this may make it harder to reduce privileges down the road if people become accustomed to adding all sorts of ad-hoc admin functionality into the launcher pod. We don't allow users to create privileged containers at all, in general, and there was some OPA tweaking required to allow Kubevirt to do so on a user's behalf.
The encrypted volume thing is definitely a use case of interest, though I think the direction I'm looking at is going to be cluster-wide and automatic to all pods using a certain storage class, Kubevirt or not, rather than user-created. That only works if you own the cluster, though, can't do that in someone else's.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/CALFpzo5K6G-k87spgx9w2fWs7sxTDoLaFQzVN%3DRN7gATXnZW-A%40mail.gmail.com.
On Thu, May 24, 2018 at 6:10 PM, Marcus <shad...@gmail.com> wrote:I think a mutating admission controller could patch pods, virt-launcher or not, if you haven't already looked at that.Thanks will do! (but ... kindly, no top posting pls ! :) )Regarding admin-only, I think it's the idea that anyone could apply a VM yaml that has an 'initContainers', which calls a container that modifies the behavior of the virt-launcher pod. It's more palatable if it were something the admin could add to virt-launcher, but the user had no control over. Imagine perhaps various initContainer 'plugins' that could be listed on the virt-controller CLI so it would apply them when it deploys instances of virt-launcher. User has no control but the admin does.Maybe. I'd disagree, this would introduce a new entire failure domain and complicated the comms protocol. Wouldn't you consider this a major architecture change? - note that initContainers plays nicely w/ the rest of k8s* what do do on timeout? fail altogether?* what to do if network partition?* what to do on invalid certificates - how long do you keep them around / rotate them for the comms - do you put them under the same CA?
* what to do to enhance change / libvirtd.sh - currently this is easy just pass a file via /var/run/kubvirt-private/${namespace}/file-arguments for example