Add host mount for serial console unix file to virt-launcher pod
@@ -69,6 +69,10 @@ func (t *templateService) RenderLaunchManifest(vm *v1.VirtualMachine) (*kubev1.P
gracePeriodSeconds = gracePeriodSeconds + int64(15)
gracePeriodKillAfter := gracePeriodSeconds + int64(15)
+ // TODO remove mounting the privateDir once
+ // the qemu pid is in the pods mount namespace
+ privateDir := fmt.Sprintf("%s-private/%s/%s", t.virtShareDir, namespace, domain)
+
// VM target container
container := kubev1.Container{
Name: "compute",
@@ -87,6 +91,10 @@ func (t *templateService) RenderLaunchManifest(vm *v1.VirtualMachine) (*kubev1.P
Name: "virt-share-dir",
MountPath: t.virtShareDir,
},
+ {
+ Name: "virt-private-dir",
+ MountPath: privateDir,
+ },
},
ReadinessProbe: &kubev1.Probe{
Handler: kubev1.Handler{
@@ -118,6 +126,14 @@ func (t *templateService) RenderLaunchManifest(vm *v1.VirtualMachine) (*kubev1.P
},
},
})
+ volumes = append(volumes, kubev1.Volume{
+ Name: "virt-private-dir",
+ VolumeSource: kubev1.VolumeSource{
+ HostPath: &kubev1.HostPathVolumeSource{
+ Path: privateDir,
+ },
+ },
+ })
containers = append(containers, container)
// TODO use constants for labels
